(PHP 4, PHP 5, PHP 7, PHP 8)
odbc_pconnect — Öffnet eine persistente Datenbankverbindung
$dsn
,$user
= null
,$password
= null
,$cursor_option
= SQL_CUR_USE_DRIVER
Öffnet eine persistente Datenbankverbindung.
Diese Funktion ist odbc_connect() sehr ähnlich. Der
einzige Unterschied besteht darin, dass die Verbindung nach dem Ende des
Skriptes erhalten bleibt. Folgende Verbindungen mit gleicher
dsn
, user
und
password
-Kombination (über
odbc_connect() und odbc_pconnect())
können dann die bestehende Verbindung weiterbenutzen.
Details können der odbc_connect()-Dokumentation entnommen werden.
Gibt eine ODBC-Verbindungskennung zurück. Bei einem Fehler wird false
zurückgegeben..
Version | Beschreibung |
---|---|
8.4.0 |
odbc erwartet nun eine Instanz von
Odbc\Connection; vorher wurde eine
Ressource erwartet.
|
8.4.0 | Diese Funktion gibt nun eine Instanz von Odbc\Connection zurück; vorher wurde eine Ressource zurückgegeben. |
8.4.0 |
user and password are now nullable,
they are now also optional and default to null .
|
8.4.0 |
Previously, using an empty string for password would not include
pwd in the generated connection string for dsn .
It is now generated to include a pwd which has an empty string as its value.
To restore the previous behaviour password can now be set to null .
|
8.4.0 |
Previously, if dsn contained uid or pwd
both user and password parameters were ignored.
Now user is only ignored if dsn contains
uid , and password is only ignored if
dsn contains pwd .
|
Hinweis: Persistente Verbindungen wirken nicht, wenn PHP als CGI-Programm verwendet wird.