From d42cc4686ef0c52157b7613810b50706dc057b98 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 24 Jun 2012 23:52:40 +0300 Subject: Add pdo_sqlsrv subdriver --- system/database/drivers/pdo/pdo_driver.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'system/database/drivers/pdo/pdo_driver.php') diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index b16ca8219..0029e1ebe 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -85,7 +85,7 @@ class CI_DB_pdo_driver extends CI_DB { } $this->trans_enabled = FALSE; - $this->_random_keyword = ' RND('.time().')'; // database specific random keyword +// $this->_random_keyword = ' RND('.time().')'; // database specific random keyword } /** @@ -144,19 +144,19 @@ class CI_DB_pdo_driver extends CI_DB { { $this->dsn .= 'dbname='.$this->database.';'; } - elseif (stripos($this->dsn, 'database') === FALSE && in_array($this->subdriver, array('ibm', 'sqlsrv'))) - { - if (stripos($this->dsn, 'dsn') === FALSE) - { - $this->dsn .= 'database='.$this->database.';'; - } - } - - // Add charset to the DSN, if needed - if ( ! empty($this->char_set) && in_array($this->subdriver, array('4D', 'sybase', 'mssql', 'dblib'))) - { - $this->dsn .= 'charset='.$this->char_set.';'; - } + elseif (stripos($this->dsn, 'database') === FALSE && $this->subdriver === ibm') + { + if (stripos($this->dsn, 'dsn') === FALSE) + { + $this->dsn .= 'database='.$this->database.';'; + } + } + + // Add charset to the DSN, if needed + if ( ! empty($this->char_set) && in_array($this->subdriver, array('4D', 'sybase', 'mssql', 'dblib'))) + { + $this->dsn .= 'charset='.$this->char_set.';'; + } } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b