title: PDO and MySQL 'between'
body: <p>I'm trying to get PDO to work with a MySQL 'between'. Below is my code:</p>
  
  <pre><code>$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);  
  
  $start_date = date('Y-m-d H:i:s', mktime(0, 0, 0, 11, 1, 2009));
  $end_date = date('Y-m-d H:i:s', mktime(23, 59, 59, 11, 30, 2009));
  
  $STH = $DBH-&gt;prepare("SELECT * FROM `table` WHERE `start_date` BETWEEN ':start_date' AND ':end_date'");
  $STH-&gt;bindParam(':start_date', $start_date, PDO::PARAM_STR);
  $STH-&gt;bindParam(':end_date', $end_date, PDO::PARAM_STR);
  $STH-&gt;execute();
  var_dump($row);
  </code></pre>
  
  <p>What gets returned is an array with '0' or 'NULL' for values. When I hard code the end date, it acts as if <code>start_date</code> is set to -1, retuning me all rows before the <code>end_date</code>. So, what am I doing wrong here?</p>