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