note 45202 added to function.mysql-affected-rows
| From: | info at natuerliche-verhuetung dot de | Date: | Sun, 29 Aug 2004 15:20:35 +0000 |
| Subject: | note 45202 added to function.mysql-affected-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75574@lists.php.net to get a copy of this message | ||
Hi
mysql_affected_rows() returned always 1 although nothing was DELETEd from the database. Finally I
found out why: I am working with two open connections and until you explicitly specify, PHP chooses
the latter one to work with:
mysql_affected_rows($GLOBALS['my_connection'])
solved the problem.
----
Manual Page -- http://www.php.net/manual/en/function.mysql-affected-rows.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45202
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45202&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45202&report=yes
Search -- http://master.php.net/manage/user-notes.php