Get affected rows for an update : Database Update : MySQL Database PHP Source Code


PHP Source Code » MySQL Database » Database Update »

 

Get affected rows for an update



<?php
   mysql_connect("mysql153.secureserver.net","navioo","password");
   mysql_select_db("navioo");

   $query = "UPDATE Employee SET salary = '39.99' ";
   $result = mysql_query($query);
   echo "There were ".mysql_affected_rows()." product(s) affected. ";

?>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo MySQL Database
» Database Update