relixx
Nov 3rd 2005, 10:37 pm
It's strange, All this time working on various ASP projects, I've never actually to retrieve data from 2 tables that have a juntion table inbetween :eek: I mean, I've designed databases that used them, I've just never had to actually implement them :/
Basically, I have to the following 3 tables:
Employee
emp_id [pk]
emp_name
Project
proj_id [pk]
proj_name
emp_proj <-junction table
emp_id
proj_id
Basically, I have to display an HTML table that shows what projects each employee is working on. Obviously (as I wouldn't be asking this question if it weren't the case :P ), more than employee can work on more than one project at a time, and a project can have more than one employee assigned to it.
The horizontal row at the top of the table displays the project name, the vertical row on the very left displays the employee name, and each cell running across has an 'x' in it if the employee is working on that project.
The thing I'm stuck on is how to retrieve the information from all 3 tables and display it all. Any suggestions?
Basically, I have to the following 3 tables:
Employee
emp_id [pk]
emp_name
Project
proj_id [pk]
proj_name
emp_proj <-junction table
emp_id
proj_id
Basically, I have to display an HTML table that shows what projects each employee is working on. Obviously (as I wouldn't be asking this question if it weren't the case :P ), more than employee can work on more than one project at a time, and a project can have more than one employee assigned to it.
The horizontal row at the top of the table displays the project name, the vertical row on the very left displays the employee name, and each cell running across has an 'x' in it if the employee is working on that project.
The thing I'm stuck on is how to retrieve the information from all 3 tables and display it all. Any suggestions?