I have two tables that I would like to connect together:

1. products - all the products for sale
2. holidays - each holiday that a product *could* fall under. ex)
Christmas, Easter, etc..
<hr>
A brief look at each table looks like this:

products table
-------------------
id
product_name
...
holiday_id

holidays table
--------------------
id
holiday_name

<hr>

The relations for these two tables is: one product can only have one
holiday, where as one holiday can have multiple products.

I tried to figure out the associations with CakePHP, but I cannot seem
to get the grasp of it.  However, when I started to do a little more
research I noticed that if I use the variable $useTable in my Holiday
Model; I can force the model to use the products table instead of the
holidays table.

My question is, should I be doing this?
I would prefer to learn the more practical way of accomplishing.

Thanks for any suggestions.


--~--~---------~--~----~------------~-------~--~----~
 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