I'm looking for a mysql select statement that does the

- Check if the value of each expert.id on the table
experts matches a value expt.id in the table
- For those values where this is true check whether
the softID value for that row matches the variable
- return the names that are left after those 2 filters

So for tables:

id    Name
1    Peter
2    Paul 
3    Mary
4    Frank

exptid  softid
1           3
2           5
2           8
3           9
3           8

1. If the softID is 2, the select should return:
peter, paul, mary and frank (frank will always be
returned no matter what, because he isn't in
2. If the softID is 3, the select should return: paul,
mary and frank
3. If the softID is 8, the select should return: peter
and frank
4. If the softID is 9, the select should return:
peter, paul and frank


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to