pg_connection_status
(PHP 4 >= 4.2.0, PHP 5)
pg_connection_status --
Gibt den Verbindungsstatus zurück
Beschreibung
int
pg_connection_status ( resource connection )
pg_connection_status() gibt den Status der
angegebenen connection zurück.
Parameter Liste
- connection
PostgreSQL Verbindungskennung.
Rückgabewerte
PGSQL_CONNECTION_OK oder
PGSQL_CONNECTION_BAD.
Beispiele
Beispiel 1. pg_connection_status() Beispiel
<?php $dbconn = pg_connect("dbname=publisher") or die("Konnte keine Verbindung aufbauen"); $stat = pg_connection_status($dbconn); if ($stat === PGSQL_CONNECTION_OK) { echo 'Verbindungsstatus ok'; } else { echo 'Verbindungsstatus bad'; } ?>
|
|