PHP Gurus,
I'll consider myself lucky to get a response so close to
Christmas, but here goes.
I have two tables. One contains member information, and one
lists which groups the members belong to. I want to select the email
address of active members from the member information table, and I want
to select only the members which belong to a particular group. Right now
I can only think to accomplish this in two lines:
$query1 = "SELECT member_id FROM groups WHERE group_id =" .
$chosenGroup
Then, take the results and do another query:
$query2 = "SELECT email FROM members WHERE active = yes AND
member_id =" . $query1Results
But surely there's a way to collapse this into one MySQL line.
--
Yoroshiku!
Dave G
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php