php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57593 PDO_DBLIB does not implement nextRowset
Submitted: 2007-03-27 17:33 UTC Modified: 2011-12-01 05:27 UTC
From: urkle@php.net Assigned: fmk (profile)
Status: Closed Package: *General Issues
PHP Version: 5.1.6 OS: CentOS 4 i386
Private report: No CVE-ID: None
 [2007-03-27 17:33 UTC] urkle@php.net
Description:
------------
The php-mssql extension implements the nextRowset feature to advance to the next result set from a query.  the current PDO_DBLIB does not provide this functionality.


Reproduce code:
---------------
$db = new PDO("dblib:host=host:1433;dbname=tempdb","user","pass");

$sql = <<<EOSQL
SELECT 1;
SELECT 2;
SELECT 3;
EOSQL;

$res = $db->prepare($sql);
$res->execute();

$row = $res->fetch(PDO::FETCH_NUM);

while ($row = $res->fetch(PDO::FETCH_NUM)
    || ($res->nextRowset() && $row = $res->fetch(PDO::FETCH_NUM))) {
  echo $res->columnCount().':';
  echo implode(',',$row)."\n";
}


Expected result:
----------------
1:1
1:2
1:3

Actual result:
--------------
PDOStatement::nextRowset(): SQLSTATE[IM001]: Driver does not support this function: driver does not support multiple rowsets in nextresult-pdo.php on line 34


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-01 05:27 UTC] ssufficool@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-12-01 05:27 UTC] ssufficool@php.net
-Status: Assigned +Status: Closed -Package: PDO_DBLIB +Package: *General Issues
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 01:01:30 2024 UTC