title: How do I get the number of affected rows when I use DBI's prepare/execute for non-select statement?
body: <p>According to the <a href="http://p3rl.org/DBI" rel="noreferrer">DBI</a> documentation, it seems I can only get the number of affected rows by the <code>do</code> method.</p>
  
  <pre><code>$rows_affected = $dbh-&gt;do("UPDATE your_table SET foo = foo + 1");
  </code></pre>
  
  <p>How can I get the same result if I use <code>prepare</code>/<code>execute</code>?</p>