[eluser]Wazzu[/eluser]
<b>Count, group and field</b>
Hi all. I have a doubt trying to make a simple query with dmz:
I want to make this query, so I get a 2 colums result, with the age and the number of users with that age: "SELECT age, count(age) FROM users GROUP BY age"
But I don't know how to use count() correctly with group.
This won't work:
$u = new User();
$u->select('age');
$u->group_by('age');
$u->count();