title: leave a field blank in searchform
body: <p>I have a searchform where you can search for properties. Right now it only works if you fill in all the fields. But how would I do if I want to eg leave a field blank and just search the rest, or just search one field and leave the rest blank?</p>
  
  <p>This is the code for the query I have today:</p>
  
  <pre><code>$sql = mysql_query("
  SELECT * 
  FROM property
  WHERE (rooms LIKE '%$room%' OR '$room' = '')
  AND (status LIKE '%$status%' OR '$status' = '')
  AND (type LIKE '%$type%' OR '$type' = '')
  AND (adress LIKE '%$county%' OR '$county' = '')
  AND (area LIKE '%$area%' OR '$area' = '')
  AND (price BETWEEN '$min' AND '$max')
  ") or die(mysql_error()); 
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>Maybe you should note that all the fields are select fields, not text fields.</p>