On Apr 10, 4:41 pm, jsundquist <[email protected]> wrote:
> What I am looking to do is kind of complex and I'm not sure the best
> way to go about doing it. I have two tables that get joined twice two
> each other. Going the same way each time.
>
> table_1 --> table_1_table_2 --> table_2
>
> and
>
> table_1 --> table_1_table_3 --> table 2
>
> They both techically have the same information however the second join
> table actually has a few extra columns in it that are needed but use
> the primary keys from table 1 and table 2. Is this possible using the
> cake framework?

Yes.

>  If I was to just write the statement myself I know I
> could do it but don't know how CakePHP handles things like that.

see http://book.cakephp.org/search/associations . Note that a join
table with more than 2 fields is usually best treated as a 'real'
model. (e.g. User hasMany Friend, Friend belongs to FromUser, ToUser)

AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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