[EMAIL PROTECTED] wrote:


I don't want to have to write 50 different ifelse statements unless I have to.
You can add all the boolean fileds in the query and not worry about doing if's to check them, the DB will automatically find the fields that match for boolean fields (just make sure to initialize all your booleans variables first). So

SELECT p.* FROM properties p WHERE beds >= $beds AND pool='$pool' AND waterfront='$waterfront' AND [other booleans ...] ORDER
by price asc;

Jc


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to