I want a list of all the people in all the meetings in a given event, for
the purpose of printing all their schedules.

I can get a list of meetings in an event given the event id with the
following query:

select meetings.id from meetings where eid=2;



People are assigned meetings in the table mpeople which contains a person
id and a meeting id, I can get a list of people in a meeting given a
meeting id:

select firstname, lastname from people left join mpeople on people.id =
mpeople.id where mpeople.mid=1;



?How do I get the list of all the people in all the meetings given an event
id? Naturally the following doesn't work in 3.23.54.

select firstname, lastname from people left join mpeople on people.id =
mpeople.id where mpeople.mid IN (select meetings.id from meetings where
eid=2);

couldn't follow the join three tables comment in the documentation.
thanks in advance,
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

Reply via email to