2 conditions why wont they work??
| From: | Brad Wright | Date: | Mon, 11 Feb 2002 03:29:25 +0000 |
| Subject: | 2 conditions why wont they work?? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-84210@lists.php.net to get a copy of this message | ||
Hi all,
Im was sure you could select a row from a mySQL database based on 2
conditions. My code:
$query2 = "select * from Table where userNo = $userNo and clientID =
$clientID";
$result2 = mysql_query($query2,$db);
This returns :
Warning: Supplied argument is not a valid MySQL result resource
b ut if i change the line to:
$query2 = "select * from Table where userNo = $userNo;
$result2 = mysql_query($query2,$db);
it works (but get all the rows with userNo = $userNo.
HELP!!!! Im sure this should work...what am i doing wrong???