Export (0) Print
Expand All

PDOStatement::nextRowset

Moves the cursor to the next result set.


bool PDOStatement::nextRowset();

true on success, false otherwise.

Support for PDO was added in version 2.0 of the Microsoft Drivers for PHP for SQL Server.

<?php
   $server = "(local)";
   $database = "AdventureWorks";
   $conn = new PDO( "sqlsrv:server=$server ; Database = $database", "", "");

   $query1 = "select * from Person.Address where City = 'Bothell';";
   $query2 = "select * from Person.ContactType;";

   $stmt = $conn->query( $query1 . $query2 );

   $rowset1 = $stmt->fetchAll();
   $stmt->nextRowset();
   $rowset2 = $stmt->fetchAll();
   var_dump( $rowset1 );
   var_dump( $rowset2 );
?>

Reference

Other Resources

PDO

Community Additions

Show:
© 2014 Microsoft