I want to list only the users with a group_id
value of 10.
Why doesn't the following query work?
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('a.id, a.name, a.username, b.group_id')
->from ('#__users a')
->join ('INNER', '#__user_usergroup_map b')
->where('b.group_id=10')
->where('a.block=0')
->order($order);
$db->setQuery($query);
return $db->loadObjectList();