Hello.
I'm looking for some help on a complicated query. I'm not sure I'm using the
Joins correctly. I have data in 5 different tables I want displayed on this
page. The query I have now is
SELECT Shows.Season_RID,
Shows.Show_Name,
Shows.Show_RID,
Season.Season_Name,
cast.Role,
production_team.Title
FROM Season,
osc1_company, Shows
LEFT JOIN production_team ON Shows.Show_RID =
production_team.Show_RID
LEFT JOIN cast
on Shows.Show_RID = cast.Show_RID
WHERE osc1_company.First_Name='$fname' AND
osc1_company.Last_Name='$lname' AND
osc1_company.RID = cast.RID AND
osc1_company.RID = production_team.RID AND
Shows.Season_RID = Season.Season_RID
ORDER BY Season.Season_RID
This works, but only if a title and a role exists for the company member.
Basically, I want to display the season name from tbl Season, then the show
title from tbl Shows, then the roles from cast and titles from
production_team for the company member.
The table Season has Season_Name and Season_RID. The table Shows has
Season_RID, Show_RID, and Show_Name. osc1_company has First_Name, Last_Name,
and RID. Cast has RID, Role, Show_RID. Production_team has RID, title,
Show_RID.
Any help folks could give would be hugely appreciated. Been working on this
for quite a while now.
Thanks
Ron