note 33188 added to function.mysql-affected-rows

From: Date: Wed, 18 Jun 2003 13:35:35 +0000
Subject: note 33188 added to function.mysql-affected-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-50583@lists.php.net to get a copy of this message
-1----------------------------- $w = "insert into..."; $q = mysql_query($w) or die('mortua est'); // 1433 times print mysql_affected_rows($cnex); // prints 1433 -2----------------------------- $w = "insert into..."; $q = mysql_query($w) or die('mortua est'); // 1433 times @mysql_query("SELECT a FROM b LIMIT x"); // print mysql_affected_rows($cnex); // prints x It appears that php's "mysql_affected_rows" calls mysql's "mysql_affected_rows"... witch says: "For SELECT statements, mysql_affected_rows() works like mysql_num_rows(). mysql_affected_rows() is currently implemented as a macro." ---- Manual Page -- http://www.php.net/manual/en/function.mysql-affected-rows.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33188 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33188&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33188&report=yes

« previous php.notes (#50583) next »