Re: Advanced Search

From: Date: Wed, 15 Jan 2003 04:35:44 +0000
Subject: Re: Advanced Search
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131651@lists.php.net to get a copy of this message
rw@xend.net 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

« previous php.general (#131651) next »