title: PDO's query vs execute
body: <p>Are they both do the same thing, only differently?</p>
  
  <p>Is there any difference besides using <code>prepare</code> between</p>
  
  <pre><code>$sth = $db-&gt;query("SELECT * FROM table");
  $result = $sth-&gt;fetchAll();
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>$sth = $db-&gt;prepare("SELECT * FROM table");
  $sth-&gt;execute();
  $result = $sth-&gt;fetchAll();
  </code></pre>
  
  <p>?</p>