The cake way is to do a find('count'), so you'd do something like
$this->Skatepark->Photo->find('count')http://book.cakephp.org/view/449/find Alternatively, you can cheat and use a correlated sub-query as one of your fields in the find, although I'm sure this violates all sorts of Cake principles. On Dec 18, 11:27 am, Kyle Decot <[email protected]> wrote: > I have a Skateparks Model and a Photos Model. I want to query the > Skateparks model and get the number of skateparks that have 1 photos, > 2 photos, etc. I'm not really sure how to go about this. > > Any help would be greatly appreciated. Thank you. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
