Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Get affected rows for an update in php

Sun Oct 26, 2008 7:30 pm

Get affected rows for an update in php
Code:
<?php
   mysql_connect
("server","jdbname","password");
   
mysql_select_db("userdb");

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

?>




Post a reply
  Related Posts  to : Get affected rows for an update in php
 vBulletin update     -  
 update query example     -  
 update an xml file with jaxb     -  
 three rows frameset .     -  
 Update table with search box using ajax     -  
 Asp.net insert update delete Examples     -  
 Select odd rows from table     -  
 update an xml file with jaxb and accessing to its elements     -  
 Update phpbb to latest version with mods     -  
 Number of Rows Returned by query in php     -  

Topic Tags

PHP Database