MySQL Forums
Forum List  »  Newbie

Re: Difficulty framing a JOIN statement
Posted by: Peter Brawley
Date: April 15, 2012 02:18PM

Your query spec seems unclear. If you just want people irrespecitve of show & role, just query people. Otherwise, consider something like this ...

SELECT p.personName, r.role
JOIN people p
LEFT JOIN peopleinshows ps ON p.personid = ps.personid AND ps.showid = $idno
LEFT JOIN roles r ON r.roleno = ps.roleno;


Options: ReplyQuote

Written By
Re: Difficulty framing a JOIN statement
April 15, 2012 02:18PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.