note 33188 deleted from function.mysql-affected-rows by danbrown
| From: | danbrown@php.net | Date: | Tue, 28 Apr 2009 01:51:58 +0000 |
| Subject: | note 33188 deleted from function.mysql-affected-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153884@lists.php.net to get a copy of this message | ||
Note Submitter: gabriel dot preda at amr dot ro
----
-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."