Lines Matching refs:db
13 $db = pg_connect($conn_str);
15 $version = pg_version($db);
17 if (!pg_send_prepare($db, 'php_test', "SELECT * FROM ".$table_name." WHERE num > \$1;")) {
20 while(pg_connection_busy($db)); // busy wait: intended
21 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
24 if (!($result = pg_get_result($db)))
30 if (!pg_send_execute($db, 'php_test', array(100))) {
33 while(pg_connection_busy($db)); // busy wait: intended
34 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
37 if (!($result = pg_get_result($db)))
62 pg_num_rows(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
63 pg_num_fields(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
71 if (!pg_send_prepare($db, "php_test2", "INSERT INTO ".$table_name." VALUES (\$1, \$2);"))
75 while(pg_connection_busy($db)); // busy wait: intended
76 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
79 if (!($result = pg_get_result($db)))
85 if (!pg_send_execute($db, "php_test2", array(9999, "A'BC")))
89 while(pg_connection_busy($db)); // busy wait: intended
90 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
93 if (!($result = pg_get_result($db)))
101 pg_close($db);