Lines Matching refs:conn
13 $conn = pg_connect($conn_str);
15 pg_query($conn, "CREATE SCHEMA {$schema_name}");
17 pg_query($conn, "CREATE TABLE {$schema_name}.foo (id INT, id2 INT)");
18 pg_query($conn, "INSERT INTO {$schema_name}.foo VALUES (1,2)");
19 pg_query($conn, "INSERT INTO {$schema_name}.foo VALUES (2,3)");
21 pg_query($conn, "CREATE TABLE {$schema_name}.bar (id4 INT, id3 INT)");
22 pg_query($conn, "INSERT INTO {$schema_name}.bar VALUES (4,5)");
23 pg_query($conn, "INSERT INTO {$schema_name}.bar VALUES (6,7)");
26 var_dump(pg_select($conn, 'foo', array('id' => 1)));
29 var_dump(pg_select($conn, "{$schema_name}.foo", array('id' => 1)));
32 var_dump(pg_select($conn, "{$schema_name}.bar", array('id' => 1)));
35 var_dump(pg_select($conn, "{$schema_name}.bar", array('id4' => 4)));
38 var_dump(pg_select($conn, "{$schema_name}.bar", array('id4' => 4), 0, PGSQL_NUM));
41 var_dump(pg_select($conn, "{$schema_name}.bar", array()));
44 var_dump(pg_select($conn, "{$schema_name}.bar"));
52 $conn = pg_connect($conn_str);
54 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.foo");
55 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.bar");
56 pg_query($conn, "DROP SCHEMA IF EXISTS {$schema_name}");