File "country.php"
Full path: /home/cakedeco/retaildirectonline.co.uk/catalog/model/localisation/country.php
File
size: 626 B (626 B bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
<?php
class ModelLocalisationCountry extends Model {
public function getCountry($country_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE country_id = '" . (int)$country_id . "' AND status = '1'");
return $query->row;
}
public function getCountries() {
$country_data = $this->cache->get('country.catalog');
if (!$country_data) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
$country_data = $query->rows;
$this->cache->set('country.catalog', $country_data);
}
return $country_data;
}
}