Annotation of embedaddon/php/ext/pgsql/tests/14pg_update_85.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: PostgreSQL pg_update() (8.5+)
3: --SKIPIF--
4: <?php
5: include("skipif.inc");
6: skip_server_version('8.5dev', '<');
7: ?>
8: --FILE--
9: <?php
10: error_reporting(E_ALL);
11:
12: include 'config.inc';
13:
14: $db = pg_connect($conn_str);
1.1.1.2 ! misho 15: pg_query($db, "SET standard_conforming_strings = 0");
! 16:
1.1 misho 17: $fields = array('num'=>'1234', 'str'=>'ABC', 'bin'=>'XYZ');
18: $ids = array('num'=>'1234');
19:
20: pg_update($db, $table_name, $fields, $ids) or print "Error in test 1\n";
21: echo pg_update($db, $table_name, $fields, $ids, PGSQL_DML_STRING)."\n";
22:
23: echo "Ok\n";
24: ?>
25: --EXPECT--
26: UPDATE php_pgsql_test SET num=1234,str='ABC',bin='\\x58595a' WHERE num=1234;
27: Ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>