array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.pg-connection-reset.php', 1 => 'pg_connection_reset', ), 'up' => array ( 0 => 'ref.pgsql.php', 1 => 'PostgreSQL-Funktionen', ), 'prev' => array ( 0 => 'function.pg-connection-busy.php', 1 => 'pg_connection_busy', ), 'next' => array ( 0 => 'function.pg-connection-status.php', 1 => 'pg_connection_status', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'de', 'path' => 'reference/pgsql/functions/pg-connection-reset.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
pg_connection_reset — Setzt die Verbindung zurück und verbindet neu
pg_connection_reset() setzt die Verbindung zurück. Dies ist nützlich bei der Fehlerbehandlung.
Version | Beschreibung |
---|---|
8.1.0 |
Der Parameter connection erwartet nun eine PgSql\Connection-Instanz;
vorher wurde eine Ressource erwartet.
|
Beispiel #1 pg_connection_reset() Beispiel
<?php
$dbconn = pg_connect("dbname=publisher") or die("Konnte keine Verbindung aufbauen.");
$dbconn2 = pg_connection_reset($dbconn);
if ($dbconn2) {
echo "Verbindung erfolgreich zurückgesetzt\n";
} else {
echo "Konnte die Verbindung nicht zurücksetzen\n";
}
?>