ID: 43342 Comment by: chx1975 at gmail dot com Reported By: glideraerobatics at hotmail dot com Status: Open Bug Type: Feature/Change Request Operating System: all PHP Version: 5.2.5 New Comment:
http://bugs.php.net/bug.php?id=44135 is the same bug -- but this needs more than a constant because the CLIENT_FOUND_ROWS can only be passed in as a connection flag. Previous Comments: ------------------------------------------------------------------------ [2007-11-20 10:42:55] glideraerobatics at hotmail dot com Description: ------------ PDO is very similar in design to Perl's DBI which does allow you to set driver specific attributes such as mysql_client_found_rows=1 as part of the DSN. Setting the attribute mysql_client_found_rows=1 is Perl's DBD::mysql will make the rows() method (equivalent of PDO's rowCount()) return the number of rows matched for the update and not just those that were actually updated. This is a very useful/efficient feature as it prevents the need for doing 'SELECT COUNT(*)' queries before doing the updates and it prevents the need for locking too (since 2 statements are no longer atomic). PDO has a setAttribute() method, but there is as yet no MYSQL_ATTR_CLIENT_FOUND_ROWS constant. My request is that this be built into the PDO mysql driver. The information rowCount() will need can be retrieved from mysql_info(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43342&edit=1