Tuesday, November 25, 2008

connecting the many to many dots - going from table1 -> table1_table2 -> table 2

I realize my question leans more towards learning php than it does the
cakephp framework but it's a little of both and i'm trying to learn
both so I hope someone is willing to help.

I have three tables: categories, categories_listings, and listings. i
have a form that lists categories with check boxes. if one is check
marked and the submit button is hit i am taken to the form action and
in data is the category id of the check marked category.

How do I go from having a category id, to finding which records match
that category id in the categories_listings table, to returning the
listings that are associated with that category id?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: