Thanks, but that is not what i am looking for. I want to do a count on all the images in the gallery. Your query just counts the galleries if i change "all" to "count". And also that query also get's all the other things attached to a gallery as well which i don't want to.
I only want to count and/or receive the pictures within a gallery. On 19 Mai, 04:42, dreamingmind <[email protected]> wrote: > I have a habtm Image->GalleryImage->Gallery set up and can do what you > are looking for with this: > > $this->Image->Gallery->find('all', > array('conditions'=>array('Gallery.name' => 'seascapes'))); > > Regards, > Don > > On May 18, 3:15 pm, func0der <[email protected]> wrote: > > > > > > > > > Hey guys, > > > i'm just wondering how you can do a ordinary hasAndBelongsToMany query > > with cake without all these dynamic bindings and stuff. > > > I'm having a gallery to galleryImages relationship but i can't search > > for images in a specific gallery over this relationship. > > This is maybe because i don't know how because i can't find a > > documentation or it's because CakePHP is not able to do it. > > > Either one or the other way there is a question: > > How can i do it? > > or > > Why is CakePHP not able to do such queries? > > > Greetings > > func0der -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
