note 107412 modified in function.mysql-affected-rows by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 21:17:38 +0000 |
| Subject: | note 107412 modified in function.mysql-affected-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187869@lists.php.net to get a copy of this message | ||
I dont know why but sometimes mysql_affected_rows does not work (return 0 or nothing) besides the
query worked well. So use this if you have a
problem: <?php $result =
mysql_query("update/delete ..."); $last =
mysql_query("SELECT ROW_COUNT();"); $last =
mysql_fetch_array($last); ?>
--was--
I dont know why but sometimes mysql_affected_rows does not work (return 0 or nothing) besides the
query worked well.
So use this if you have a problem:
$result = mysql_query("update/delete ...");
$last = mysql_query("SELECT ROW_COUNT();");
$last = mysql_fetch_array($last);
http://php.net/manual/en/function.mysql-affected-rows.php