Lines Matching refs:conn
12 $conn = pg_connect($conn_str);
14 pg_query($conn, 'CREATE SCHEMA phptests');
16 pg_query($conn, 'CREATE TABLE foo (id INT, id2 INT)');
17 pg_query($conn, 'CREATE TABLE phptests.foo (id INT, id2 INT)');
20 pg_insert($conn, 'foo', array('id' => 1, 'id2' => 1));
21 pg_insert($conn, 'phptests.foo', array('id' => 1, 'id2' => 2));
23 pg_update($conn, 'foo', array('id' => 10), array('id' => 1));
24 var_dump(pg_update($conn, 'foo', array('id' => 10), array('id' => 1), PGSQL_DML_STRING));
26 pg_update($conn, 'phptests.foo', array('id' => 100), array('id2' => 2));
27 var_dump(pg_update($conn, 'phptests.foo', array('id' => 100), array('id2' => 2), PGSQL_DML_STRING));
29 $rs = pg_query($conn, 'SELECT * FROM foo UNION SELECT * FROM phptests.foo ORDER BY id');
34 pg_query($conn, 'DROP TABLE foo');
35 pg_query($conn, 'DROP TABLE phptests.foo');
36 pg_query($conn, 'DROP SCHEMA phptests');