xref: /PHP-7.4/ext/pgsql/tests/12pg_insert.phpt (revision d679f022)
1--TEST--
2PostgreSQL pg_insert()
3--SKIPIF--
4<?php
5include("skipif.inc");
6skip_bytea_not_escape();
7?>
8--FILE--
9<?php
10error_reporting(E_ALL);
11
12include 'config.inc';
13
14$db = pg_connect($conn_str);
15$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
16
17pg_insert($db, $table_name, $fields) or print "Error in test 1\n";
18echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING)."\n";
19
20echo "Ok\n";
21?>
22--EXPECT--
23INSERT INTO "php_pgsql_test" ("num","str","bin") VALUES (1234,E'AAA',E'BBB');
24Ok
25