Hi, Select person from persons as p, person_skills as ps where p.personid = ps.person_id And ps.skill_id in (id1,id2..);
Anvar. At 09:40 PM 21/01/2002 -0500, you wrote: >I have three tables as follows (simplified): > >persons (person_id,person) >skills( skill_id,skill) >person_skills( person_id,skill_id) > >A person can have one or more entries in the person_skills table, indicating >their skills. > >I need to select persons where there skills match ALL skill_id's in a set, >not just one match. I can do this with muliple selects and coding (using >php), but I think there is a way to do it with straight sql. > >Can anyone help me with this. > >Brian > > >--------------------------------------------------------------------- >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 --------------------------------------------------------------------- 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