ID: 42883 Updated by: [EMAIL PROTECTED] Reported By: salac dot r at gmail dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: openSUSE 10.2 PHP Version: 5.2.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Seems to work fine for me. What version of MySQL are you using? Previous Comments: ------------------------------------------------------------------------ [2007-10-07 13:34:46] salac dot r at gmail dot com Description: ------------ When I'm using ATTR_EMULATE_PREPARES set to true, function rowCount returns bad result (0). I think that it's quite strange because without ATTR_EMULATE_PREPARES it returns god values. Reproduce code: --------------- $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array( PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, PDO::ATTR_EMULATE_PREPARES => true) ); $result=$dbh->query("SELECT * FROM Table"); echo "rows = ".$result->rowCount(); Expected result: ---------------- rows = 7 //number of rows in Table Actual result: -------------- rows = 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42883&edit=1