1--TEST--
2PostgreSQL pg_result_status()
3--EXTENSIONS--
4pgsql
5--SKIPIF--
6<?php include("inc/skipif.inc"); ?>
7--FILE--
8<?php
9include 'inc/config.inc';
10$table_name = "table_16pg_result_status";
11
12$db = pg_connect($conn_str);
13pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)");
14
15$sql = "SELECT * FROM ".$table_name." WHERE num = -2";
16$result = pg_query($db, "BEGIN;END");
17
18echo pg_result_status($result)."\n";
19echo pg_result_status($result, PGSQL_STATUS_STRING)."\n";
20?>
21--CLEAN--
22<?php
23include('inc/config.inc');
24$table_name = "table_16pg_result_status";
25
26$db = pg_connect($conn_str);
27pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
28?>
29--EXPECT--
301
31COMMIT
32