note 34500 deleted from function.msql-affected-rows by didou

From: Date: Tue, 30 Sep 2003 07:42:18 +0000
Subject: note 34500 deleted from function.msql-affected-rows by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57379@lists.php.net to get a copy of this message
Note Submitter: info@letrioperdu.net ---- I tried this but it did not work. I always get this error : "Supplied argument is not a valid MySQL-Link resource" That's why I used the link_identifier instead of the query_identifier and that does work. Hope this solves somebody's problem like it solved mine. <?php // Connect to database server $hd = mysql_connect("localhost", "USER","PASS") or die ("Unable to connect"); // Execute sample query (UPDATE some data in customer table) $res = mysql_query("UPDATE customer SET type=1",$hd) or die ("Unable to run query"); // Display number of rows affected // And here I had to use the link_identifier echo "Rows deleted: " . mysql_affected_rows($hd); // Close connection mysql_close($hd); ?>

« previous php.notes (#57379) next »