xref: /PHP-5.4/ext/pgsql/tests/98old_api.phpt (revision 4fe93ca5)
1--TEST--
2PostgreSQL old api
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7
8include('config.inc');
9
10$db = pg_connect($conn_str);
11$result = pg_exec("SELECT * FROM ".$table_name);
12pg_numrows($result);
13pg_numfields($result);
14pg_fieldname($result, 0);
15pg_fieldsize($result, 0);
16pg_fieldtype($result, 0);
17pg_fieldprtlen($result, 0);
18pg_fieldisnull($result, 0);
19
20pg_result($result,0,0);
21$result = pg_exec("INSERT INTO ".$table_name." VALUES (7777, 'KKK')");
22$oid = pg_getlastoid($result);
23pg_freeresult($result);
24pg_errormessage();
25$result = pg_exec("UPDATE ".$table_name." SET str = 'QQQ' WHERE str like 'RGD';");
26pg_cmdtuples($result);
27
28
29
30echo "OK";
31?>
32--EXPECT--
33OK
34