title: PHP/mysql get number of affected rows of UPDATE statement
body: <p>With php/mysql how can i get the number of rows that a query affected?</p>
  
  <p>what i tried so far:</p>
  
  <pre><code>$result = mysql_query($q);
  mysql_num_rows($result);
  </code></pre>
  
  <p>but it says that 
  Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource</p>