Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
diddipoeler committed Mar 12, 2024
1 parent 08ac904 commit 7f954d5
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion admin/models/playground.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,37 @@ class sportsmanagementModelPlayground extends JSMModelAdmin
static $playground = null;
static $cfg_which_database = 0;


function getPlaygroundNotic($playground__id)
{
$app = Factory::getApplication();
// Get a db connection.
$db = Factory::getDbo();
$query = $db->getQuery(true);
$result = array();

$query->select('*');
$query->from('#__sportsmanagement_playground_details');
$query->where('id = ' . $playground__id);
$db->setQuery($query);
try
{
$result = $db->loadObjectList();
$db->disconnect(); // See: http://api.joomla.org/cms-3/classes/JDatabaseDriver.html#method_disconnect
}
catch (Exception $e)
{
$db->disconnect(); // See: http://api.joomla.org/cms-3/classes/JDatabaseDriver.html#method_disconnect
$msg = $e->getMessage(); // Returns "Normally you would have other code...
$code = $e->getCode(); // Returns '500';
$app->enqueueMessage(__METHOD__ . ' ' . __LINE__ . ' ' . $msg, 'error'); // commonly to still display that error
//$result = false;
}


return $result;
}

/**
* sportsmanagementModelplayground::getAddressString()
*
Expand Down Expand Up @@ -215,7 +246,7 @@ function getNextGames($project = 0, $pgid = 0, $played = 0, $allproject = 0)
$msg = $e->getMessage(); // Returns "Normally you would have other code...
$code = $e->getCode(); // Returns '500';
$app->enqueueMessage(__METHOD__ . ' ' . __LINE__ . ' ' . $msg, 'error'); // commonly to still display that error
$result = false;

}
}

Expand Down

0 comments on commit 7f954d5

Please sign in to comment.