Skip to content

Commit d78220f

Browse files
committed
add test for bug #68957
1 parent c49d9f0 commit d78220f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ext/pdo_dblib/tests/bug_68957.phpt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
PDO_DBLIB bug #68957 PDO::query doesn't support several queries
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
6+
require dirname(__FILE__) . '/config.inc';
7+
?>
8+
--FILE--
9+
<?php
10+
require 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();
16+
print_r($rows);
17+
18+
?>
19+
--EXPECT--
20+
Array
21+
(
22+
[0] => Array
23+
(
24+
[computed0] => 1
25+
[0] => 1
26+
)
27+
28+
)
29+

0 commit comments

Comments
 (0)