Hi, I need some help, with a strange behaivour of CI or maybe im too novice.
//in a MODEL i have some funcions with queries
function getUsers(){
$qryUsrs = $this->db>query('select * from users');
return $qryUsrs->result_array();
}
function getDocs(){
$qryDocs = $this->db>query('select * from documents');
return $qryDocs->result_array();
}
//in my CONTROLLER i call both
$this->load->model('qry_model');
$data['users'] = $this->qry_model->getUsers();
$data['docs'] = $this->qry_model->getDocs();
$this->load->view('my_view',$data);
//in my VIEW I display both queries each in a table
echo $this->table->generate($users);
echo $this->table->generate($docs);
The problem is that in both tables I see exactly the same data, i suppose i need to ‘clear’ the info in the array before getting another, someone knows how i must to proceed to get the correct data in each table?
Thanks in advance
