PHP 4.0 Bug #7517 Updated: mysql_affected_rows doesn't work with mysql 3.23.25 with BDB table

From: Date: Tue, 09 Jan 2001 11:45:10 +0000
Subject: PHP 4.0 Bug #7517 Updated: mysql_affected_rows doesn't work with mysql 3.23.25 with BDB table
Groups: php.dev 
Request: Send a blank email to php-dev+get-43540@lists.php.net to get a copy of this message
ID: 7517 Updated by: cynic Reported By: jpoon88@yahoo.com Old-Status: Open Status: Analyzed Old-Bug Type: MySQL related Bug Type: Documentation problem Assigned To: Comments: user feedback: -------------- Regarding to case #7517, since we put the $conn->Affected_Rows() function after the commit statement, that why nothing return. If we put the Affected_rows() just after update/insert SQL Statement, it works. -------------- Manual is a bit ambiguous, as it says: "Get number of affected rows in previous MySQL operation" - which would suggest affected rows of the _last_ operation will be returned, and "returns the number of rows affected by the last INSERT, UPDATE or DELETE query" - which would suggest it'll return affected rows of the last such query no matter what other types of queries follow it. I've looked at the MySQL C API desc, and http://www.mysql.com/documentation/mysql/commented/manual.php?section=node_431 says: "May be called immediately after mysql_query() for UPDATE, DELETE, or INSERT statements." So it should be probably emphasized in the manual. Previous Comments: --------------------------------------------------------------------------- [2001-01-08 14:37:27] cynic@php.net Could you please provide a short script reproducing the behavior? --------------------------------------------------------------------------- [2000-10-29 00:08:05] jpoon88@yahoo.com Hi, We are developing a application using mySQL 3.23.25 beta version with php 4.02. If we created a mysql table for type=BDB (mean transaction processing supports), The transaction handling begin/commit/rollback method is work perfect except mysql_affected_rows function doesn't return anything (always 0). Did you have a same problem under this situation. Thank you in advance for your assistance. James Poon --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7517

« previous php.dev (#43540) next »