Lines Matching refs:db
15 $db = pg_connect($conn_str);
17 $version = pg_version($db);
19 if (!pg_send_prepare($db, 'php_test', "SELECT * FROM ".$table_name." WHERE num > \$1;")) {
22 while(pg_connection_busy($db)); // busy wait: intended
23 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
26 if (!($result = pg_get_result($db)))
32 if (!pg_send_execute($db, 'php_test', array(100))) {
35 while(pg_connection_busy($db)); // busy wait: intended
36 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
39 if (!($result = pg_get_result($db)))
64 pg_num_rows(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
65 … pg_num_fields(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
73 if (!pg_send_prepare($db, "php_test2", "INSERT INTO ".$table_name." VALUES (\$1, \$2);"))
77 while(pg_connection_busy($db)); // busy wait: intended
78 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
81 if (!($result = pg_get_result($db)))
87 if (!pg_send_execute($db, "php_test2", array(9999, "A'BC")))
91 while(pg_connection_busy($db)); // busy wait: intended
92 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
95 if (!($result = pg_get_result($db)))
103 pg_close($db);