PHP Manual
Prev |  | Next

# pg_send_query

(PHP 4 >= 4.2.0)

pg_send_query -- Send asynchronous query

## Description

bool pg_send_query ( resource connection, string query)
bool pg_send_query ( string query)

pg_send_query() send asynchronous query to the `connection`. Unlike pg_query(), it can send multiple query to PostgreSQL and get the result one by one using pg_get_result(). Script execution is not blocked while query is executing. Use pg_connection_busy() to check connection is busy (i.e. query is executing). Query may be canceled by calling pg_cancel_query().

Although user can send multiple query at once, user cannot send multiple query over busy connection. If query is sent while connection is busy, it waits until last query is finished and discards all result.

See also pg_query(), pg_cancel_query(), pg_get_result() and pg_connection_busy()

Prev | Home | Next
pg_select | Up | pg_set_client_encoding