select people.id as pid,concat(lastname,", ",firstname) as name
from people
left join epeople on epeople.pid=people.id
left join events on events.id=epeople.eid
where events.id!=2
I think will do it, although something "feels" wrong. Hmmm, let me know.
On Tuesday, January 21, 2003, at 11:43 AM, Josh L Bernardini wrote:
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;
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 --------------------------------------------------------------------- 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