title: PDO queries search whole column
body: <p>I want to select the entire column of a mysql database table, but only if a value has not been set.</p>
  
  <p>For mysqli I would have set the value to equal the name of the column without making it a string, however in the PDO query it doesn't work?</p>
  
  <p>I have the following:</p>
  
  <pre><code>$stmt = $this-&gt;_db-&gt;prepare('SELECT BookDate, DepDate, BkngVal, Channel, Market, Region, MappedType, calc_ExpMargin FROM sales
  WHERE MappedType = :tailormade AND Region = :region AND MappedType = :type AND Channel = :channel AND BookDate &lt;= :firstDate AND BookDate &gt;= :secondDate');
  $stmt-&gt;execute(array(
    'tailormade' =&gt; $tailormade,
    'region' =&gt; $region,
    'type' =&gt; $type,
    'channel' =&gt; $channel,
    'firstDate' =&gt; $date1,
    'secondDate' =&gt; $date2
  ));
  </code></pre>
  
  <p>Now lets say that the variables are all set except for $region. If that is the case I want to search all the options with the region option searching the whole region column.</p>
  
  <p>Is this possible?</p>
  
  <p>I hope the question makes sense.</p>