summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/odbc/odbc_driver.php')
-rw-r--r--system/database/drivers/odbc/odbc_driver.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 662a1063a..14c85c8e2 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -104,23 +104,14 @@ class CI_DB_odbc_driver extends CI_DB {
/**
* Non-persistent database connection
*
+ * @param bool $persistent
* @return resource
*/
- public function db_connect()
+ public function db_connect($persistent = FALSE)
{
- return @odbc_connect($this->dsn, $this->username, $this->password);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Persistent database connection
- *
- * @return resource
- */
- public function db_pconnect()
- {
- return @odbc_pconnect($this->dsn, $this->username, $this->password);
+ return ($persistent === TRUE)
+ ? odbc_pconnect($this->dsn, $this->username, $this->password)
+ : odbc_connect($this->dsn, $this->username, $this->password);
}
// --------------------------------------------------------------------