On Monday 22 April 2002 00:53, Prodoc wrote:
> E.g. I've got two tables (User and Rights) both contianing UserID, I
> want to retrieve some UserID's from the Rights table and use those
> UserID's the get the nickname of those users from the User table.
>
> ("SELECT UserID FROM Rights WHERE...........")
> ("SELECT NickName FROM User WHERE...........")
>
> Is it possible to combine those two statements?

Try:

SELECT Rights.UserID, User.NickName FROM Rights, User
 WHERE User.UserID = Rights.UserID

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
HOW YOU CAN TELL THAT IT'S GOING TO BE A ROTTEN DAY:
        #15 Your pet rock snaps at you.
*/

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

Reply via email to