xref: /PHP-8.0/ext/pgsql/tests/bug76548.phpt (revision a555cc0b)
1--TEST--
2Bug #76548 pg_fetch_result did not fetch the next row
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7include('config.inc');
8
9$conn = pg_connect($conn_str);
10
11$result = pg_query($conn, 'SELECT v FROM (VALUES (1), (2), (3)) AS t(v)');
12
13while ($value = pg_fetch_result($result, 0)) {
14  var_dump($value); // should be 1, 2 then 3.
15}
16
17?>
18--EXPECT--
19string(1) "1"
20string(1) "2"
21string(1) "3"
22