[eluser]phybertek[/eluser]
Hello,
I spent 2 hours trying to run a query with Active Records. Is this a bug?
Code:
$q = $this->db->select('CITY','count(id) as cntr')
->from(tCITY)
->group_by('CITY')
->get();
return $q;
--
//$query = the output of your model code returned $q.
foreach ($query->result() as $row)
{
echo "$row->id | $row->cntr<br>";
}
This produced error. I don't have the error on me as I am at work, but if you run
this same query directly, it works fine. You can't access the second table column.