many to many problem
Hi all,
I have a list of centres which have many employees and some employees work in more than 1 centre. I need to get the data (opening times, available facilities) for the individual centre and a list of the employees that work at the particular centre.
I have 3 tables for this:
centre: for the centre info
emp: for the employee info
join: a table that has the foreign keys (employee id, centre id) and a primary key (just cos u never know :)
now for the difficult bit:
so somebody loads up centre (AA) so Im getting the centre id (AA) and searching JOIN for all occurrences in the centre id field. now that I have the ID of each member of staff how do i retrieve the emploee data from the EMP table , Ive been banging my head for a while and im starting to make a dent in my forehead. I just keep on getting NO DATA, DOH!
|