Re: How to use 'group by' with paginate()?

2009-07-18 Thread Onkel Judith
On 16 Jul., 10:44, Miles J mileswjohn...@gmail.com wrote: Do you have a $paginate property in your controller? You should place the group within the model within the $paginate. Sorry for the late answer. Yes, there's $paginate in the controller: var $paginate = array( 'limit' =

Re: How to use 'group by' with paginate()?

2009-07-18 Thread Onkel Judith
Oh, after all I think this was a stupid question. :) I just had to change the recursive-value to 1. Because of the hasMany relation the comments are listed in a sub-array. The number of comments was easy to find, simply use count() on this array.

Re: How to use 'group by' with paginate()?

2009-07-16 Thread Miles J
Do you have a $paginate property in your controller? You should place the group within the model within the $paginate. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email

How to use 'group by' with paginate()?

2009-07-15 Thread Onkel Judith
Hi I'm new to CakePHP and maybe it's a very stupid question. But I don't hope so :) My question is: How to use a group by clause with paginate()? Here's a short description of my project: Table 'news': Id, title, ... Table 'comments': Id, news_id, ... I want to query all news with the number