To make a select query in Joomla.

Example (Selecting specific fields from users with condition and sorting)

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('name', 'username', 'email')));
$query->where($db->quoteName('username') . ' LIKE '. $db->quote('%web%'));
$query->order('name ASC');
$results = $db->loadObjectList();

See also



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.