Back to PhocacartRegion class

Method getRegionsByCountry

public static
getRegionsByCountry
(mixed $countryId)

Method getRegionsByCountry - Source code

public static function getRegionsByCountry($countryId)
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id, a.title FROM #__phocacart_regions AS a' . ' WHERE a.country_Id = ' . (int) $countryId . ' ORDER BY a.id';
    $db->setQuery($query);
    $regions = $db->loadObjectList();
    return $regions;
}