note 24059 added to function.mysql-affected-rows
| From: | pumukl at gmx dot li | Date: | Mon, 05 Aug 2002 16:17:47 +0000 |
| Subject: | note 24059 added to function.mysql-affected-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34308@lists.php.net to get a copy of this message | ||
hmm... there's a problem, is it possible to get the number of rows which are found by the where
clause?
the problem is if you have such table:
id txt
1 a
2 b
mysql_query("update tab set txt='a' where id = 1");
echo mysql_affected_rows();
the mysql_affected_rows() would return 0 since it didn't modify any row
any ideas for workaround?
--
http://www.php.net/manual/en/function.mysql-affected-rows.php
http://master.php.net/manage/user-notes.php?action=edit+24059
http://master.php.net/manage/user-notes.php?action=delete+24059
http://master.php.net/manage/user-notes.php?action=reject+24059