xref: /PHP-7.2/ext/pgsql/tests/bug76548.phpt (revision cb97fd30)
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==DONE==
19--EXPECTF--
20string(1) "1"
21string(1) "2"
22string(1) "3"
23==DONE==
24