Sunday, March 1, 2009

Need to select 5 records from one table per category_id

I have a that associates a category_id, and I need to select 5 rows
per category_id (we'll assume 1,2,3,4,5,6,7) so I need 5 from each
category_id...

How can I pull this off in CakePHP? The only way I can think is to do
individual queries to each table but that is not only going to put a
big load on the database, it's just an ugly approach in my opinion

Thanks in advance. :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: