mysql select statement in php having three conditions
| From: | sunaram patir | Date: | Fri, 16 Dec 2005 14:40:53 +0000 |
| Subject: | mysql select statement in php having three conditions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227544@lists.php.net to get a copy of this message | ||
hi,
can someone tell me how to do this:
i have to retrive data from a mysql table let's sayTABLE . i have to
check that the rows i retrive meet this condition:
field1='$variable',field2 is false and field3 is also false. as you
can see field2 and field3 are bool type. field1 is varchar. i did this
query "SELECT * FROM TABLE WHERE field1='$variable' AND field2='0' AND
field3='0'"; another one tried is "SELECT * FROM TABLE WHERE
field1='$variable' AND field2=false AND field3=false"; But none was a
success. it didn't matter whether i used '0' or 0 and false or
'false'.
thanks in advance.