title: Finding affected rows
body: <p>How do I know how many rows were affected by an update query?</p>
  
  <pre><code>mysql&gt; update todel set name = 'xyz' where id = 1;
  Query OK, 0 rows affected (0.00 sec)
  Rows matched: 1  Changed: 0  Warnings: 0
  
  mysql&gt; select mysql_affected_rows();
  ERROR 1305 (42000): FUNCTION test.mysql_affected_rows does not exist
  </code></pre>
  
  <p>I want to use this function in stored procedure.</p>