Код: Выделить всё
public function getData($numb, $period, $status){
$this->db->select("COUNT(*) AS jml")
->from()
->where_not_in();
if($status !== 'all'){
$this->db->where("LAYANAN.TGL_LAYANAN BETWEEN DATEADD(" . $period ."," . $numb .", GETDATE()) AND GETDATE()");
}
$this->db->where_in()
->group_by("");
return $query = $this->db->get();
}
Подробнее здесь: https://stackoverflow.com/questions/532 ... tiverecord
Мобильная версия