Storing comma-delimited lists in a single database column is generally considered "a bad idea". Why? Mainly, for the very reason you are struggling with - relating that data to other tables. The preferred way to store multiple values would be through a relationship or join table. Here's how that could work (there might be some subtle issues with the table structure/query syntax below as I don't have any experience with MySQL, only Microsoft SQL Server):
meedate (date or date/time)
personnelID (or whatever it is called in your table) (integer)
... the rest of the columns in the existing table
Instead of storing a comma-delimited list of personnel id's in the meememberIDs column of your Meetings table, you would insert a record in the MeetingsPersonnel table for each combination of meeting and personnel. So in the example above, the three entries you showed would be stored in the MeetingsPersonnel table like this:
Now if you wanted to generate a list of people who attend meetings, you join Meetings to Personnel through the MeetingsPersonnel table:
SELECT p.fullname, p.email FROM meetings m INNER JOIN meetingspersonnel mp on m.meeid = mp.meeid INNER JOIN personnel p on mp.personnelID = p.personnelID WHERE m.meedate = '2014-06-15'
If you create appropraite indexes on these tables, this arrangement will perform very, very fast.
The alternative is to write your own function to parse the comma-delimited list into a temporary table, then use the temporary table to be the intermediate join. This will be highly inefficient, especially as the number of employees who attend a specific meeting increases.
To answer the immediate question, if you have a meetingQuery for a particular day, you could run the second query so as to pick out the meememberIDs who attended. Something like
select memberID, concat(firstname, " ", lastname) as fullname, email
where memberID in (#meetingQuery.meememberIDs#)
This is just a quick-fix, for example, if you are unable to change things. Ultimately, the best solution is the one Carl offers.
Thanks Dan, you're correct. The best and cleanest way is to do it as a separate tables to gather the nessesary primary keys from each table then link them with All with sql. Thanks for your help