Yes it is possible! You have to use a combination of count and group by! So look it up and tell us what you will try! Enjoy, John
On Oct 30, 1:24 pm, Daniel <[email protected]> wrote: > Hi. I've got two models, Tag and Story, each with a HABTM relation > with each other (joined via a stories_tags table). > > What I'm looking for is the ability to do a find('all') on the Tag > model, and within the results have a count of all the stories that are > related to each tag. > > Is this possible to do? 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 -~----------~----~----~----~------~----~------~--~---
