why not $this->Event->findAll(array('Tag.tag_id' => $tag_id));
since you want all the events with a particular tag_id On 3/1/07, Dave <[EMAIL PROTECTED]> wrote: > > OK, so I've established a HABTM association between "Tags" and > "Events". Tags have many events and Events have many tags, so it goes > both ways. > > I want to fetch events for a particular Tag id: > > function getEventsByTag($tag_id) { > > $events = $this->Event->findAll('Tag.id='.$tag_id); > return $events; > > } > > It returns empty. > > ?? > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---