1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-26 20:04:44 +01:00
ext-pq/tests/crash_result_iterator.phpt

42 lines
432 B
Plaintext
Raw Normal View History

2014-11-25 13:43:48 +01:00
--TEST--
crash result iterator
--SKIPIF--
<?php
include "_skipif.inc";
?>
--FILE--
<?php
echo "Test\n";
include "_setup.inc";
$conn = new pq\Connection(PQ_DSN);
$sql = "
SELECT id
FROM generate_series(1,3) id
ORDER BY id ASC
LIMIT 5
";
foreach ($conn->exec($sql) as $row) {
var_dump($row);
}
?>
===DONE===
--EXPECT--
Test
array(1) {
[0]=>
int(1)
}
array(1) {
[0]=>
int(2)
}
array(1) {
[0]=>
int(3)
}
===DONE===