Back to PhocacartZone class

Method getRegions

public static
getRegions
(mixed $id = 0)

Method getRegions - Source code

public static function getRegions($id = 0)
{
    if ($id > 0) {
        $db = Factory::getDBO();
        $q = ' SELECT a.region_id FROM #__phocacart_zone_regions AS a' . ' WHERE a.zone_id = ' . (int) $id . ' ORDER BY a.zone_id';
        $db->setQuery($q);
        $regions = $db->loadColumn();
        return $regions;
    }
    return false;
}