It's a no go...

This is what I tryed:

"SELECT User.NickName FROM User, Rights WHERE (User.UserID = 
Rights.UserID && (Rights.MainID = ${row['MainID']} || 
ISNULL(Rights.MainID))"

The only thing I want to be able to retrieve is a list of nicknames 
(User.NickName) based on MainID. In the Rights Table the MainID value 
has to be NULL or = ${row['MainID']}



Jason Wong wrote:
> 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
> 


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

Reply via email to