I have three tables, people, events and epeople. epeople includes a person
id and an event id and works as a list of people attending events in the
database.
The following query returns a list of all the people participating in a
particular event
given an event id.
select people.id as pid, concat(lastname, ", ", firstname) as name from
events
left join epeople on events.id=epeople.eid
left join people on epeople.pid=people.id
where events.id=2;
How could I get a list of all the people not participating?
thought I would add to the where clause with:
and people.id is null;
but that returns an empty set.
tia,
jb
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php