I have a Listings table and another Categories table, and Lists hasMany
Categories. I am trying to write a cake query where it finds all lists in a
certain category.

$listings = $this->Listing->findAll(
array('Category.category_id'=>$category_id)
);

this returns an error.

Also, if I do $this->Listing->findAll(), it just returns the columns in
Listings, not Categories. How would i do this?

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to