I am new to coidigniter.
If I am calling single model method from controller function then its working fine.
If I amt try to call more than one model function from single model, through single controller function, then I get
Fetal Error:Call to a member function result() on Boolean
my code look like this
controller.php
public function get_details(){
$this->my_model->get_company(); //first call
$this->my_model->get_employee(); //second call
}
my_model.php
public function get_company(){
$qry="CALL get_company_details";
$result=$this->db->query($qry);
foreach($result->result() as $row){
$data[]=$row;
}
return $data;
}
public function get_employee(){
$qry="CALL get_employee_details";
$result=$this->db->query($qry);
foreach($result->result() as $row){
$data[]=$row;
}
return $data;
}
Can I call like that. Please help me...