Ok once again the I cannot find the logic. I need this query to give the user the ablilty to only search for one of the items and not have to complete the entire search criteria. They also need to be able to live all of the form blank, hit search and have it return everything in the database.
I would like to have a list of logical operators such as AND, LIKE, and OR. And when I should use them. I fould some documentaion on php.net, but was not enough for my rookie brain to process.
Thanks to anyone in advance who helps me. It is much appreciated.
$query = "SELECT * FROM $usertable WHERE (price >= '$minPrice' AND price <= '$maxPrice') AND (quanBed >= '$quanBed' AND quanBath >= '$quanBath') AND (propType LIKE '%$propType%') AND (highSchl LIKE '%$highSchl%') AND (propertyid = '$propertyid' AND brokerid = '$brokerid') ORDER BY price ASC, homeid ASC";