xref: /PHP-8.0/ext/pdo_dblib/tests/bug_68957.phpt (revision 26dfce7f)
1--TEST--
2PDO_DBLIB bug #68957 PDO::query doesn't support several queries
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo_dblib')) die('skip not loaded');
6require __DIR__ . '/config.inc';
7?>
8--FILE--
9<?php
10require __DIR__ . '/config.inc';
11
12$query = "declare @myInt int = 1; select @myInt;";
13$stmt = $db->query($query);
14$stmt->nextRowset(); // Added line
15$rows = $stmt->fetchAll();
16print_r($rows);
17
18?>
19--EXPECT--
20Array
21(
22    [0] => Array
23        (
24            [computed] => 1
25            [0] => 1
26        )
27
28)
29