PDOStatement::nextRowset
將資料指標移至下一個結果集。
語法
bool PDOStatement::nextRowset();
傳回值
成功時傳回 true,否則傳回 false。
備註
Microsoft Drivers for PHP for SQL Server 2.0 版已新增 PDO 支援。
範例
<?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 );
?>