Lines Matching refs:db
16 $db = pg_connect($conn_str);
18 $version = pg_version($db);
24 $db_socket = pg_socket($db);
27 $nb_send = pg_send_prepare($db, 'php_test', "SELECT * FROM ".$table_name." WHERE num > \$1;");
31 nb_flush($db, $db_socket);
34 nb_consume($db, $db_socket);
36 if (!($result = pg_get_result($db))) {
41 $nb_send = pg_send_execute($db, 'php_test', array(100));
45 nb_flush($db, $db_socket);
48 nb_consume($db, $db_socket);
50 if (!($result = pg_get_result($db))) {
70 pg_num_rows(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
71 pg_num_fields(pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num > \$1;", array(100)));
79 $nb_send = pg_send_prepare($db, "php_test2", "INSERT INTO ".$table_name." VALUES (\$1, \$2);");
83 nb_flush($db, $db_socket);
86 nb_consume($db, $db_socket);
88 if (!($result = pg_get_result($db))) {
93 $nb_send = pg_send_execute($db, "php_test2", array(9999, "A'BC"));
97 nb_flush($db, $db_socket);
100 nb_consume($db, $db_socket);
102 if (!($result = pg_get_result($db))) {
108 pg_close($db);