I could not get the conditionals to work when building the SQL query. Do you have an example so I can see how it works? I figured there must be a way to do something like this so the $sql variable keeps building?
if(isset($_GET['mls']) AND trim($_GET['mls']) != '') {
$mls = mysql_real_escape_string(trim($_GET['mls']);
$sql = "MLSNum = echo $mls OR "
}
if(isset($_GET['lowprice']) AND trim($_GET['lowprice']) != '') {
$lowprice = mysql_real_escape_string(trim($_GET['lowprice']);
$sql = sql . "((ListPr >= echo $lowprice AND ListPr <= echo $highprice) OR "
}
{exp:query limit=“10” paginate=“both” sql=“SELECT * FROM listings WHERE $sql ORDER BY ListPr ASC”}