[eluser]Wazzu[/eluser]
[quote author="OverZealous" date="1275335363"]@Wazzu
Count is not the same as SQL count. It's a special function that returns the number of results directly.
I think to get what you want, you'll need to use select_func():
Even if there was a function, it would be called select_count. Please see the manual for the purpose of count.[/quote]
Thanks, Phil, I'll give a try. I didn't know 'select_funct' method (I still haven't found it in the user guide)
The 'other' way I found was using 2 selects:
Code:
$u->select('age');
$u->select('count(age) as `numrows`');
$u->group_by('age');
$u->get();