My model has a function that should run 2 different queries.
Ideally I would like it to return 2 different vars (1 from each query) that would be available to my controller.
The code below obviously doesn't work b/c the first return ends execution right there. But how could I do something that would generate these two results within the same function?
Thanks for any help / pointer you can provide.
MODEL -- Hypothetical code
function ABC()
{
$query1 = $this->db->query( ... MySQL code #1 here ... );
$data1 = array();
foreach (query1->result() as $row){
$data1[$row->k] = $row->value;
return $data1;
$query2 = $this->db->query( ... MySQL code #2 here ... );
$data2 = array();
foreach (query2->result() as $row){
$data2[$row->k] = $row->value;
return $data2;
}