title: PDO IN() Array Statement AND a placeholder
body: <p>I found this code on SO, which is great for using PDO and the IN() statement together.</p>
  
  <pre><code>$values = explode(',', $values) ; # 1,4,7
  
  $placeholders = rtrim(str_repeat('?, ', count($values)), ', ') ;
  $query = "SELECT * FROM table WHERE id IN ($placeholders)";
  
  $stm = $db-&gt;prepare($query) ;
  $stm-&gt;execute($values) ;
  </code></pre>
  
  <p>However, how can I mix in another addition to the query so the query looks like this:</p>
  
  <pre><code>$query = "SELECT * FROM table WHERE id IN ($placeholders) AND product=?";
  $stm = $db-&gt;prepare($query) ;
  $stm-&gt;execute(array($values,$product)) ; //error happens when adding product placeholder
  </code></pre>
  
  <p>I thought this would work but I get:</p>
  
  <p><strong>Warning:</strong> PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in line 3 (the $stm line)</p>
  
  <p>Any idea how to get this to behave as intended?</p>
  
  <p><strong>UPDATED</strong> execute to array, still not working..</p>