ID: 34758 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Mac OS X 10.4 PHP Version: 5CVS-2005-10-06 (snap) -Assigned To: +Assigned To: wez New Comment:
Assigned to the maintainer. Previous Comments: ------------------------------------------------------------------------ [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