ID: 41325 Updated by: [EMAIL PROTECTED] Reported By: php-qa at sebastianmendel dot de Status: Open Bug Type: Documentation problem Operating System: Windows / Linux PHP Version: 5.2.2 New Comment:
If the mysqli version of this indeed differs from its mysql brethren, then the mysqli documentation should be updated. Whether we mention this difference somewhere, not sure where, but at some point we'll want a "How to upgrade mysql to mysqli" document. The user notes should never be used or thought of as a replacement for documentation. Any doc worthy information from them should be folded into the manual. Previous Comments: ------------------------------------------------------------------------ [2007-05-20 10:22:37] ljbuesch at purdue dot edu >From 1.20 to 1.21 the note: -- For SELECT statements mysqli_affected_rows works like mysqli_num_rows. -- Was removed with a commit note by didou: -- Removed useless note -- Should we re-add the note, or update the documents to reflect that this function does indeed work on select statements, as it is misleading to not mention it. ------------------------------------------------------------------------ [2007-05-08 18:27:21] php-qa at sebastianmendel dot de just to clarify: my test works as expected and not as i have written, SORRY! ------------------------------------------------------------------------ [2007-05-08 17:17:46] php-qa at sebastianmendel dot de ok, my fault, it is not a really a bug in mysqli_affected_rows() - it is more a documentation bug the mysql c api function mysql_affected_rows returns not only for teh last INSERT, UPDATE, REPLACE or DELETE, but for SELECT too "returns the number of rows changed (for) UPDATE), deleted (for DELETE, or inserted (for INSERT. For SELECT statements, mysql_affected_rows() works like mysql_num_rows()." http://dev.mysql.com/doc/refman/5.1/en/mysql-affected-rows.html and mysqli_affected_rows() does it the same way, of course, but the php manual does read other "Returns the number of rows affected by the last INSERT, UPDATE, REPLACE or DELETE query." http://php.net/mysqli_affected_rows ------------------------------------------------------------------------ [2007-05-08 15:28:06] [EMAIL PROTECTED] Cannot reproduce on Linux with both client & server of version 5.0.26. ------------------------------------------------------------------------ [2007-05-08 15:07:07] [EMAIL PROTECTED] I can't reproduce this with 5.0.27. I get the expected output of 1. Do you have any other sort of special configuration or setting? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/41325 -- Edit this bug report at http://bugs.php.net/?id=41325&edit=1