|
pazafuera -> Search Query (2/9/2008 1:31:20)
|
Hello Everybody! I AM GOING CRAZY HERE! I'm not sure why I can't figure this out, but it's not working. Rentals Table contains the following field as criteria: City (text), Bedrooms (number), Bathrooms(number), Porch (text), Patio (text), Pool (text) The query should find all rentals in the city chosen, with the number of bathrooms & bedrooms chosen, and if the Porch, Patio and Pool options are chosen, then rentals with those options are pulled. This is what I have: fp_sQry="SELECT * FROM tblRentals WHERE (RentalCity LIKE '%::RentalCity::%' AND RentalBedrooms >= ::RentalBedrooms:: AND RentalBathrooms >= ::RentalBathrooms:: AND Patio LIKE '::Patio::' AND Pool LIKE '::Pool::' AND Porch LIKE '::Porch::') ORDER BY RentalID DESC" fp_sDefault="RentalCity=&RentalBedrooms=0&RentalBathrooms=0&Patio=&Pool=&Porch=" When I do a search, and leave the Porch, Patio and Pool options unchecked, it pulls no records. What I want it to do is pull all records, regardless of whether or not they include a porch, patio or pool. If the checkbox "Porch" is checked, THEN only the records with porches will be pulled. Does that makes sense? Why will this not work!!!!?! Thanks in advance.
|
|
|
|