I'm trying to use DISTINCT to get a list of cities from a column in my DB.
function cityData() {
$db =& JFactory::getDBO();
$query = "SELECT DISTINCT MSTCITY FROM " . $db->nameQuote('#__mls') . " ORDER BY MSTCITY;";
$db->setQuery($query);
$tbl = $db->loadObjectList();
return $tbl;
}
Is there something akin to loadObjectList()
that I can use ?