xref: /PHP-8.1/ext/pgsql/tests/98old_api.phpt (revision 1f427779)
1--TEST--
2PostgreSQL old api
3--EXTENSIONS--
4pgsql
5--SKIPIF--
6<?php include("skipif.inc"); ?>
7--FILE--
8<?php
9
10include('config.inc');
11
12$db = pg_connect($conn_str);
13$result = pg_exec($db, "SELECT * FROM ".$table_name);
14pg_numrows($result);
15pg_numfields($result);
16pg_fieldname($result, 0);
17pg_fieldsize($result, 0);
18pg_fieldtype($result, 0);
19pg_fieldprtlen($result, 0);
20pg_fieldisnull($result, 0);
21
22pg_result($result,0,0);
23$result = pg_exec($db, "INSERT INTO ".$table_name." VALUES (7777, 'KKK')");
24$oid = pg_getlastoid($result);
25pg_freeresult($result);
26pg_errormessage($db);
27$result = pg_exec($db, "UPDATE ".$table_name." SET str = 'QQQ' WHERE str like 'RGD';");
28pg_cmdtuples($result);
29
30
31
32echo "OK";
33?>
34--EXPECTF--
35Deprecated: Function pg_numrows() is deprecated in %s on line %d
36
37Deprecated: Function pg_numfields() is deprecated in %s on line %d
38
39Deprecated: Function pg_fieldname() is deprecated in %s on line %d
40
41Deprecated: Function pg_fieldsize() is deprecated in %s on line %d
42
43Deprecated: Function pg_fieldtype() is deprecated in %s on line %d
44
45Deprecated: Function pg_fieldprtlen() is deprecated in %s on line %d
46
47Deprecated: Function pg_fieldisnull() is deprecated in %s on line %d
48
49Deprecated: Function pg_result() is deprecated in %s on line %d
50
51Deprecated: Function pg_getlastoid() is deprecated in %s on line %d
52
53Deprecated: Function pg_freeresult() is deprecated in %s on line %d
54
55Deprecated: Function pg_errormessage() is deprecated in %s on line %d
56
57Deprecated: Function pg_cmdtuples() is deprecated in %s on line %d
58OK
59