In MySQL you use the GROUP BY keyword to accomplish this

On Sun, Nov 22, 2009 at 7:44 PM, death.au <[email protected]> wrote:

> I've been looking around, and haven't been able to find anything on
> this at all, and I was wondering if it was even possible to sort by a
> count of related models using the paginator.
>
> Using the basic blog example, I would like to list all posts with the
> paginator, sorted by the number of comments. Is there any way to do
> this currently?
>
> In future I would also like to sort by things like average rating and
> other aggregates, but I thought I'd begin with the basics.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
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=.


Reply via email to