I have a bit of a dilema..
You see, i need to display data from 2 tables
1: subjects
2: teachers
Now I need to display the subject information along with the teacher's name (found in table.teachers )
This is a rather simple left join..
But my problem comes when one deletes a row from the teacher's table...
As you know in Joining tables, the left (subjects.teacherID) must match with right table (teachers.teacherID) for it to display that particular row..
However, if the particular teacher is deleted, the subject info/row with referance to that particular teacher doesnt show.
Hence, if i have 5 subject rows, only 4 rows will show...
and my client has no idea that he has 5 subjects set..
How do i get around this dilema? I was thinking of not using joins, instead, retrieve the subjects first and then the teacher.. so that if the teacher is deleted, my php scripts can tell the user so.. but this requires double access to the database and i dunno if it's technically efficient.
Would love to hear some advise.
tea