| Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64 Path : /home/devsafetybis/op3038.dev.safetybis.com/catalog/model/localisation/ |
| Current File : /home/devsafetybis/op3038.dev.safetybis.com/catalog/model/localisation/zone.php |
<?php
class ModelLocalisationZone extends Model {
public function getZone($zone_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone WHERE zone_id = '" . (int)$zone_id . "' AND status = '1'");
return $query->row;
}
public function getZonesByCountryId($country_id) {
$zone_data = $this->cache->get('zone.' . (int)$country_id);
if (!$zone_data) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone WHERE country_id = '" . (int)$country_id . "' AND status = '1' ORDER BY name");
$zone_data = $query->rows;
$this->cache->set('zone.' . (int)$country_id, $zone_data);
}
return $zone_data;
}
}