title: pdo prepared statement multiple execution?
body: <p>I'm just getting to implement PDO in my site but I was wondering if it is possible to execute prepared statement multiple times?</p>
  
  <pre><code>$SQL = $dbh-&gt;prepare("SELECT * FROM user WHERE id=? AND users=?");
  $SQL -&gt; execute(array($id,$userid));
  while($check = $SQL -&gt; fetchObject()){
  </code></pre>
  
  <p>and then I would use a while loop for this SQL</p>
  
  <p>Can I use the same $SQL for another execution within the while loop? So I don't have to type in the prepared statement again?</p>
  
  <pre><code>$SQL -&gt; execute(array($id2,$userid2));
  while($check2 = $SQL -&gt;fetchObject(){
  //while loops for second execution, but I'm not sure how it works cause 
  //its using the same $SQL?
      }
      }//this end bracket is for the first while loop
  </code></pre>