title: PDO Update not replacing the placeholders in a prepared statement
body: <p>Im trying to update a table with the following code. If I change <code>WHERE temp_booking_id = ':temp_booking_id'");</code> to use the actual, current session <code>temp_id</code>, the query will run, but adds the placeholders into the table (e.g.: check-out) as the value.</p>
  
  <p><code>$data</code> is holding the correct values, but is not replacing the placeholders.</p>
  
  <p>Been staring at this for hours and can't for the life of me work out what the problem is, and looked around but haven't found a solution.</p>
  
  <p><code>PDOStatement:errorInfo()</code> is returning </p>
  
  <blockquote>
    <p>PDOStatement::errorInfo(): Array ( [0] => 00000 )</p>
  </blockquote>
  
  <p>and if I remove the inverted commas around the placeholders, it returns</p>
  
  <blockquote>
    <p>PDOStatement::errorInfo(): Array ( [0] => HY093 )</p>
  </blockquote>
  
  <p>Any ideas?</p>
  
  <pre><code>try {
    $data = array(
      'temp_booking_id' =&gt; $_SESSION['temp_id'],
      'check_in' =&gt; $in,
      'check_out' =&gt; $out, 
      'adults' =&gt; $a,
      'children1' =&gt; $c1,
      'children2' =&gt; $c2,
      'infants' =&gt; $i,
      'cots' =&gt; $c,
      'promo_code' =&gt; $pc
   );
  
   $STH = $DBH-&gt;prepare("UPDATE b_temp_booking 
     SET check_in = ':check_in',
     check_out = ':check_out',
     adults = ':adults',
     children1 = ':children1',
     children2 = ':children2',
     infants = ':infants',
     cots = ':cots',
     promo_code = ':promo_code' 
     WHERE temp_booking_id = ':temp_booking_id'");
  
   $STH-&gt;execute($data);
  
   echo "\nPDOStatement::errorInfo():\n";
   $arr = $STH-&gt;errorInfo();
   print_r($arr);
  
  } catch(PDOException $e) {
    echo 'ERROR: ' . $e-&gt;getMessage();
  }
  </code></pre>