Complex Left Join
| From: | Keith Spiller | Date: | Mon, 31 Oct 2005 20:29:18 +0000 |
| Subject: | Complex Left Join | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-40575@lists.php.net to get a copy of this message | ||
Hi,
Can anyone help me turn this into a left join?
I want to get all of the records from the directors table whether matches exist in the members table
or not.
SELECT d.directorid, d.fname, d.mname, d.lname, d.title, d.suffix, d.active, d.function,
m.id, m.directorid, m.committee, m.position, m.year FROM directors as d, members as m
WHERE d.directorid = m.directorid
AND m.year = '2006'
ORDER BY d.lname, d.mname, d.fname;
Thank you for your help...
Keith