Advanced Search

From: Date: Wed, 15 Jan 2003 04:16:19 +0000
Subject: Advanced Search
Groups: php.general 
Request: Send a blank email to php-general+get-131648@lists.php.net to get a copy of this message
Hello! Any quick solutions to this: if (!$city && !$sub_name && !$address && !$pool && !$waterfront && !$waterview && !$golf && !$type && !$beds) {$result = mysql_query("SELECT p.* FROM properties p ORDER by price asc;");} elseif (!$city && !$sub_name && !$address && !$pool && !$waterfront && !$waterview && !$golf && !$type) {$result = mysql_query("SELECT p.* FROM properties p WHERE beds >= $beds ORDER by price asc;");} I don't want to have to write 50 different ifelse statements unless I have to. Please show me the way to make the search more efficient. TIA RW

« previous php.general (#131648) next »