summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/98old_api.phpt
blob: 2667e097e303b7832477a41212d512ada53e327c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--TEST--
PostgreSQL old api
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php

include('config.inc');

$db = pg_connect($conn_str);
$result = pg_exec("SELECT * FROM ".$table_name);
pg_numrows($result);
pg_numfields($result);
pg_fieldname($result, 0);
pg_fieldsize($result, $field_name);
pg_fieldtype($result, 0);
pg_fieldprtlen($result, 0);
pg_fieldisnull($result, 0);

pg_result($result,0,0);
$result = pg_exec("INSERT INTO ".$table_name." VALUES (7777, 'KKK')");
$oid = pg_getlastoid($result);
pg_freeresult($result);
pg_errormessage();
$result = pg_exec("UPDATE ".$table_name." SET str = 'QQQ' WHERE str like 'RGD';");
pg_cmdtuples($result);



echo "OK";
?>
--EXPECT--
OK