On Tue, Jan 13, 2009 at 12:59 PM, Webweave <[email protected]> wrote: > Or even easier (although less cake-like, probably more efficient at > the DB level): > > 'fields' => array('Group.*', '(select count(1) from users User where > User.group_id = Group.id) as users_count')
Genius. I should have thought of that. I didn't try the first as many things that apply to find don't apply to paginate. I had tried similar to your first suggestion already. Thanks. -- Fedora 9 : sulphur is good for the skin ( www.pembo13.com ) --~--~---------~--~----~------------~-------~--~----~ 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=en -~----------~----~----~----~------~----~------~--~---
