that would be a nice improvement, i think. maybe such query would return an array like this:
$this->User->findAll($condtitions.' GROUP BY User.name') Array ( 'User.name' => array( 'John' => array( [0] => (the row here) [1] => (the row here) [2] => (the row here) ), 'Carl' => array( [0] => (the row here) [1] => (the row here) ) ) ) Is it possible to do a model behaviour, for example ? spark On 5/10/07, AD7six <[EMAIL PROTECTED]> wrote: > > > > On 10 mayo, 12:48, floepi <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > can someone please tell me how i can group in my SQL query when i am > > using an array as condition for the findAll. > > You can't (afaik) - you need to use a string constraint. Do you need a > group by though, would a sort not suffice? > > > $this->User->findAll($condtitions.' GROUP BY User.name') > > Well... even if it was possible to use GROUP by with an array > constraint php doesn't let you concatonate a string onto the end of an > array like that, all you'll get as a result is "array GROUP BY...". > > hth, > > AD > > > > > -- [livesets] http://djspark.com.br/ [web] http://synapsisdi.com.br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---