I need to run a query that selects the usernames of all the members a particular member has referred on the second level. So member 5 refers 10, 11, and 12, I need the usernames of everyone referred by 10, 11, or 12. Currently I run one query to get 10, 11, 12, make that a string, then do another query with member in ($string). Is there a way to do it with a nested query? Something like:
SELECT username FROM members WHERE referer IN (SELECT id FROM members WHERE referer = 5); TIA! --------------------------------------------------------------------- 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