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