2016-04-13 15:16:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class CQ extends CI_Model{
|
|
|
|
|
|
|
|
function __construct(){
|
|
|
|
// Call the Model constructor
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function get_zones(){
|
2019-09-24 23:05:45 +00:00
|
|
|
$CI =& get_instance();
|
|
|
|
$CI->load->model('Stations');
|
|
|
|
$station_id = $CI->Stations->find_active();
|
|
|
|
|
2016-04-13 15:16:07 +00:00
|
|
|
$data = $this->db->query(
|
|
|
|
"select COL_CQZ, count(COL_CQZ)
|
2019-06-17 16:44:50 +00:00
|
|
|
from ".$this->config->item('table_name')."
|
2019-09-24 23:05:45 +00:00
|
|
|
where COL_CQZ is not null and station_id = ".$station_id."
|
2016-04-13 15:16:07 +00:00
|
|
|
group by COL_CQZ order by COL_CQZ"
|
|
|
|
);
|
|
|
|
|
|
|
|
return $data->result();
|
|
|
|
}
|
|
|
|
}
|