Results 1 to 2 of 2
Jan 26, 2010, 03:48 #1
- Join Date
- Oct 2004
- 0 Post(s)
- 0 Thread(s)
Isolating the OR part of a SQL query
I have a property database that the user can search for various criteria: city, county, price etc.
There are some properties with a price of zero, where zero means that the price just isn't listed. So it really should be returned in any search regardless of the price the user has selected.
Does anybody know how I should structure my query so that the min, and max price specified by the user is searched, but the properties with price of zero are also returned?
I tried something like this:
SELECT * FROM p WHERE city='xyz' AND ((price >= 100000 AND price <=500000) OR price=0)
But that didn't work.
Any help is greatly appreciated.