pg_ping(3) php man page | unix.com

Man Page: pg_ping

Operating Environment: php

Section: 3

PG_PING(3)																PG_PING(3)

pg_ping - Ping database connection

SYNOPSIS
bool pg_ping ([resource $connection])
DESCRIPTION
pg_ping(3) pings a database connection and tries to reconnect it if it is broken.
PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 pg_ping(3) example <?php $conn = pg_pconnect("dbname=publisher"); if (!$conn) { echo "An error occurred. "; exit; } if (!pg_ping($conn)) die("Connection is broken "); ?>
SEE ALSO
pg_connection_status(3), pg_connection_reset(3). PHP Documentation Group PG_PING(3)
Related Man Pages
db2_pclose(3) - php
pg_close(3) - php
pg_lo_unlink(3) - php
pg_query(3) - php
pg_version(3) - php
Similar Topics in the Unix Linux Community
New Code Tags (Syntax Highlighting)
Please Welcome Don Cragun as Lead Moderator
Status of UNIX.COM Forum Transformation
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun