Objective

To make a simple query in Joomla to select one single record from one single table.

Example (Selecting all users, all fields)

Define query

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__users'));
$db->setQuery($query);

Get results: array of objects

$results = $db->loadObjectList();


See also

Source

 

Keep Me Informed

Keep me informed of the latest extensions releases and offers. One email maximum per month.

Offer Me A Coffee!

If you like my work, offer me a coffee! Nick.