diff options
Diffstat (limited to 'ext/pgsql/tests/17result.phpt')
-rw-r--r-- | ext/pgsql/tests/17result.phpt | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/ext/pgsql/tests/17result.phpt b/ext/pgsql/tests/17result.phpt index e8c3f390de..265d00c657 100644 --- a/ext/pgsql/tests/17result.phpt +++ b/ext/pgsql/tests/17result.phpt @@ -4,10 +4,26 @@ PostgreSQL pg_fetch_*() functions <?php include("skipif.inc"); ?> --FILE-- <?php -include("result.inc"); +error_reporting(E_ALL); + +include 'config.inc'; + +$db = pg_connect($conn_str); + +$sql = "SELECT * FROM $table_name"; +$result = pg_query($db, $sql) or die('Cannot qeury db'); +$rows = pg_num_rows($result); + +var_dump(pg_fetch_object($result, 1)); +var_dump(pg_fetch_array($result, 1)); +var_dump(pg_fetch_row($result, 1)); +var_dump(pg_fetch_assoc($result, 1)); +var_dump(pg_result_seek($result, 0)); + +echo "Ok\n"; ?> --EXPECT-- -object(stdClass)(3) { +object(stdClass)#1 (3) { ["num"]=> string(1) "1" ["str"]=> @@ -39,7 +55,7 @@ array(3) { } array(3) { ["num"]=> - string(1) "2" + string(1) "1" ["str"]=> string(3) "ABC" ["bin"]=> |