ID: 34758 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: PDO related Operating System: Mac OS X 10.4 PHP Version: 5CVS-2005-10-06 (snap) Assigned To: wez New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-10-07 10:35:36] [EMAIL PROTECTED] Assigned to the maintainer. ------------------------------------------------------------------------ [2005-10-06 14:37:45] [EMAIL PROTECTED] Description: ------------ Using PDO DBLIB driver to connect to MSSQL server each SELECT query I've tried this far returns a valid resultset but PDOStatement::rowCount() always returns int(0). PDO::exec() returns the correct row count, however. Reproduce code: --------------- <?php $pdo = new PDO(...); $query = "SELECT 1+1"; $stmt = $pdo->query($query); var_dump($stmt->rowCount()); var_dump($stmt->fetchColumn()); var_dump($pdo->exec($query)); ?> Expected result: ---------------- int(1) string(1) "2" int(1) Actual result: -------------- int(0) string(1) "2" int(1) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34758&edit=1