Added option to toggle use of pconnect.

This commit is contained in:
mdean 2001-07-01 17:15:19 +00:00
parent f58b8aa55e
commit 55520a7296

View File

@ -21,6 +21,7 @@ class db {
var $User = "";
var $Password = "";
var $use_pconnect = False;
var $auto_stripslashes = False;
var $Halt_On_Error = "yes"; ## "yes" (halt with message), "no" (ignore errors quietly), "report" (ignore errror, but spit a warning)
@ -54,7 +55,10 @@ class db {
$this->ifadd($this->Port, "port=").
$this->ifadd($this->User, "user=").
$this->ifadd($this->Password, "password=");
if ($this->use_pconnect)
$this->Link_ID=pg_pconnect($cstr);
else
$this->Link_ID=pg_connect($cstr);
if (!$this->Link_ID) {
$this->halt("Link-ID == false, pconnect failed");
}