title: PDO: Invalid parameter number: number of bound variables does not match number of tokens...but the counts DO match up
body: <p>I'm getting what should be a clear-cut error message:</p>
  
  <pre><code>Invalid parameter number: number of bound variables does not match number of tokens
  </code></pre>
  
  <p>I've gotten it before, and it's always because I've forgotten a colon or because the number of bound variables didn't match the number of tokens (imagine that).</p>
  
  <p>In today's case, I'm not able to figure out why I'm getting this error. I have six bound variables, six colons and six tokens. var_dumping before binding outputs proper values for $this->productId and all the $this->contents[] values, so everything is correct and non-empty going into the binding process.</p>
  
  <p>Here's the code I'm working with:</p>
  
  <pre><code>$sql = 'insert into courses 
          (product_id, title, price, length, body_about, body_outline, body_profile, body_prerequisites, status_id) 
          values 
          (:product_id, :title, "0", "0", :body_about, :body_outline, :body_profile, :body_prerequisites, "1")';
  
  $s -&gt; bindValue(':product_id', $this-&gt;productId);
  $s -&gt; bindValue(':title', $this-&gt;contents['title']);
  $s -&gt; bindValue(':body_about', $this-&gt;contents['overview']);
  $s -&gt; bindValue(':body_outline', $this-&gt;contents['outline']);
  $s -&gt; bindValue(':body_profile', $this-&gt;contents['audience']);
  $s -&gt; bindValue(':body_prerequisites', $this-&gt;contents['prerequisites']);               
  $s -&gt; execute();
  </code></pre>
  
  <p>Does anything obvious stand out to you?</p>