bernk
July 15th, 2008, 04:59 PM
I'm working on a car dealership site and have to setup an inventory database which can be searched with the common criteria found on these kids of sites:
make, model, year range, price range, milage, etc.
My question is this...if the user only selects a make and a price range, then the other fields will be "". So my select statment would look something like this:
SELECT * FROM inventory WHERE make="Audi" && model="" && milage="" && price BETWEEN low_price AND high_price; ...you get the idea?
How can I get around this, I'm a noob when it comes to database stuff...
make, model, year range, price range, milage, etc.
My question is this...if the user only selects a make and a price range, then the other fields will be "". So my select statment would look something like this:
SELECT * FROM inventory WHERE make="Audi" && model="" && milage="" && price BETWEEN low_price AND high_price; ...you get the idea?
How can I get around this, I'm a noob when it comes to database stuff...