select as

From: Date: Mon, 09 Apr 2001 04:39:31 +0000
Subject: select as
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47715@lists.php.net to get a copy of this message
Greets: I have a bit of php code that looks for a matching user/pass in a mysql table. There are three user/pass phrases in the table along with a an email that corresponds to each user/pass pair. Is there any way to construct a query that will do both the matching of the user/passes and also then give the corresponding email that matches the user/pass? table roughly looks like this: username pass email user_name2 pass2 email2 .... select * from customer where user_name='$username' && pass='$password' || user_name2='$username' && pass2='$pass'"; so if it matches on user_name2/pass2 I would then want to get email2....... Thanks for any help! ccma

« previous php.general (#47715) next »