Organizing a query
| From: | Carlos Alberto Bazan-Canabal | Date: | Thu, 21 Oct 2004 19:26:26 +0000 |
| Subject: | Organizing a query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36953@lists.php.net to get a copy of this message | ||
Hello.
I'm working on a simple search for my file, and I have a question on
structuring my query. This is what I want to do:
select * from table where
a=b
AND (b=$var1 or c=$var1 or d=$var1)
AND b <> 99
In the above, you could have:
- either b or c or d or none would = $var1
- more than one of b or c or d would = $var1
Could anyone suggest a syntax for my select statement?
Thank you!
Carlos.