db->select('*'); $this->db->from('subject'); $this->db->where(array('status'=>1,'department'=>$id)); $query = $this->db->get(); //echo $this->db->last_query();exit; return $query; } }