xref: /PHP-5.6/ext/pdo_dblib/tests/bug_68957.phpt (revision d78220fb)
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 dirname(__FILE__) . '/config.inc';
7?>
8--FILE--
9<?php
10require dirname(__FILE__) . '/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            [computed0] => 1
25            [0] => 1
26        )
27
28)
29
30