Get affected rows for an update
<?php
mysql_connect("mysql153.secureserver.net","java2s","password");
mysql_select_db("java2s");
$query = "UPDATE Employee SET salary = '39.99' ";
$result = mysql_query($query);
echo "There were ".mysql_affected_rows()." product(s) affected. ";
?>
Related examples in the same category