sorting records with order by and group by

2009-10-05 Thread vekija
Hi, I'm having a problem with sorting the recordset with order by and group by statements. Would appreciate any help. There are 2 models, Team and Vote (Team has many Votes) and I want to order teams based on the number of votes they got. Here's the find call: $teams = $this-find('all',

Re: sorting records with order by and group by

2009-10-05 Thread Bert Van den Brande
Do you mean that you executed the query from the Cake debug information directly on your mysql-server ? If that is the case I have no idea where the difference in results is coming from ... On Mon, Oct 5, 2009 at 8:32 AM, vekija vedran.konto...@gmail.com wrote: Hi, I'm having a problem with

Re: sorting records with order by and group by

2009-10-05 Thread vekija
yes, that is the case... thanx anyway On Oct 5, 2:55 pm, Bert Van den Brande cyr...@gmail.com wrote: Do you mean that you executed the query from the Cake debug information directly on your mysql-server ? If that is the case I have no idea where the difference in results is coming from ...