Get affected rows for an update : Database Update « MySQL Database « PHP






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

1.Update Employee table
2.Update data record and get the affected rows