php-8.0.30-src/ext/pdo_dblib/tests/bug_68957.phpt

29 lines
504 B
PHP

--TEST--
PDO_DBLIB bug #68957 PDO::query doesn't support several queries
--SKIPIF--
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require __DIR__ . '/config.inc';
?>
--FILE--
<?php
require __DIR__ . '/config.inc';
$query = "declare @myInt int = 1; select @myInt;";
$stmt = $db->query($query);
$stmt->nextRowset(); // Added line
$rows = $stmt->fetchAll();
print_r($rows);
?>
--EXPECT--
Array
(
[0] => Array
(
[computed] => 1
[0] => 1
)
)