summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-12-03 15:42:10 +0100
committerAndrey Andreev <narf@bofh.bg>2012-12-03 15:42:10 +0100
commitc07c4855f808a0b3c0aac7d8056f38161185a4c7 (patch)
treec8b9c0edad23322b835a320ae8f8eb123e064004 /system/database/drivers
parent05aa2d653a76b086a909739b2c9386289aa2e0fb (diff)
Fix postgre db_connect()
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index acad016b3..44cd0ce9b 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -139,24 +139,24 @@ class CI_DB_postgre_driver extends CI_DB {
public function db_connect($persistent = FALSE)
{
if ($persistent === TRUE
- && ($conn = @pg_pconnect($this->dsn))
- && pg_connection_status($conn) === PGSQL_CONNECTION_BAD
- && pg_ping($conn) === FALSE
+ && ($this->conn_id = @pg_pconnect($this->dsn))
+ && pg_connection_status($this->conn_id) === PGSQL_CONNECTION_BAD
+ && pg_ping($this->conn_id) === FALSE
)
{
return FALSE;
}
else
{
- $conn = @pg_connect($this->dsn);
+ $this->conn_id = @pg_connect($this->dsn);
}
- if ($conn && ! empty($this->schema))
+ if ($this->conn_id && ! empty($this->schema))
{
$this->simple_query('SET search_path TO '.$this->schema.',public');
}
- return $conn;
+ return $this->conn_id;
}
// --------------------------------------------------------------------