Wednesday, October 26, 2011

Multiply foreign keys in one table.

My program is consist of

tables:
staff
schools
positions
positions_schools_staffs

1 staff can be in in different school
1 staff can have different position in every school.

I do it using HABTM to hospital,

So one staff can have many hospital
But i dont know how to retrieve the positions.

positions_schools_staffs structure:

id int
staff_id int
school_id int
position_id int
created date
modified date


Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate