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