Goal: run a custom script inside Joomla to get usable data back. I was doing the following as a test:
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
->select('count (*) from jos_users');
// Reset the query using our newly populated query object.
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$results = $db->loadObjectList();
and i put it together with other scripts running queries. It would not run - how do i get it to run?