pg_result_status

(PHP 4 >= 4.2.0, PHP 5)

pg_result_status --  Get status of query result

Description

mixed pg_result_status ( resource result [, int type] )

pg_result_status() returns status of result resource, or the command tag associated with the result. Possible values of type are PGSQL_STATUS_LONG or PGSQL_STATUS_STRING. The default is PGSQL_STATUS_LONG.

Possible return values are PGSQL_EMPTY_QUERY, PGSQL_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_TO, PGSQL_COPY_FROM, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR and PGSQL_FATAL_ERROR if PGSQL_STATUS_LONG is specified.

When PGSQL_STATUS_STRING is used, then the returned value is the command completion tag from PostgreSQL.

See Also

pg_connection_status()