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