following are my posted variables from search form:
$city = $_REQUEST['city'];
$location = $_REQUEST['location'];
$bedrooms = $_REQUEST['noofbedrooms'];
$addeddate = $_REQUEST['addeddate'];
$minprice = $_REQUEST['pricefrom'];
$maxprice = $_REQUEST['priceto'];
$minarea = $_REQUEST['areafrom'];
$maxarea = $_REQUEST['areato'];
$propertytype = $_REQUEST['proptype'];
so far so good. Now i need some good suggestions for the following scenario. Almost every element in my field are optional. That means i can get empty values in above variables.
What should be my scenario to create the mysql query for the above variables. On case can be that i use conditions for each and every scenario. eg
if($city=="")
$query="";
elseif($location=="")
$query="";
and so on....
i need some professional approach for this.