On Jul 31, 2006, at 2:53 PM, [EMAIL PROTECTED] wrote:
>
> OK, I have Post and Category, they both hasAndBelongsToMany each
> other,
> how can I get all posts in one category,
$this->Category->find('id = '.$id);
> and all categories inone Post,
$this->Post->find('id = '.$id);
> that's the question :-).
Print_r() out the results of those calls, and you should see the
associated models (given that your association has been set up
correctly).
-- John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---