pg_get_pid

(PHP 4 >= 4.3.0, PHP 5)

pg_get_pid -- Ping database connection

Description

int pg_get_pid ( resource connection)

pg_get_pid() gets backend (database server process) PID. PID is useful to check if NOTIFY message is sent from other process or not.

Example 1. PostgreSQL backend PID

<?php
$conn
= pg_pconnect("dbname=publisher");
if (!
$conn) {
    echo
"An error occured.\n";
    exit;
}

// Backend process PID. Use PID with pg_get_notify()
$pid = pg_get_pid($conn);
?>

See also pg_get_notify().


Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft