Logicproblem in WHERE statement
| From: | Andy | Date: | Tue, 15 Jan 2002 22:05:18 +0000 |
| Subject: | Logicproblem in WHERE statement | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15844@lists.php.net to get a copy of this message | ||
Hi there,
I am building a user search engine. Now I do not know how to gett following:
a mandatory field and a voluntary field
For example I would like to get all female users and those who are from
canada.
The results should show all users who are female regardless of nationality
But it should also show all users from canada.
How would this look like?
SELECT *
FROM table
WHERE sex=1 AND country='CA'
This is wrong I know. But how does it work???
Thanx for any help
cheers Andy