On 5 Feb 2001 21:27:13 -0800, Dallas Kropka <[EMAIL PROTECTED]> wrote:
>SELECT first_name FROM admin_table, user_table WHERE userNum = 1000
>
> The info will only be in one or the other.... but what (if any) is the
>correct syntax?
You mean something like
SELECT first_name FROM users
LEFT JOIN admin_table on users.userNum = admin_table.userNum
LEFT JOIN user_table on users.userNum = user_table.userNum
WHERE admin_table.userNum=1000 OR user_table.userNum = 1000
?
(Disclaimers: There's probably a more efficient way of doing this. I've just
finished an epic battle with MS SQL Server's poxy excuse for full-text
searching and don't feel list spending any more time playing around with SQL
statements this evening.)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]