summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/bug76548.phpt
blob: 9087b234a2f4a007e3995d0e8e619cc6eed0eb84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #76548 pg_fetch_result did not fetch the next row
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');

$conn = pg_connect($conn_str);

$result = pg_query($conn, 'SELECT v FROM (VALUES (1), (2), (3)) AS t(v)');

while ($value = pg_fetch_result($result, 0)) {
  var_dump($value); // should be 1, 2 then 3.
}

?>
--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"