diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-28 12:45:04 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-28 12:45:04 +0200 |
commit | 2cb262ff0ee22f3928e39f19dc0112b9eb26cabc (patch) | |
tree | 9ccc0e2dc903ed4b40b7b73d41f5b98dfb45514c /system/database/drivers/odbc | |
parent | c2c4694469be036120156d16364c7a822c744094 (diff) | |
parent | 3b2587e1559d2cbe751d04f801f999ef3fa4e74c (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 6704264c6..ad773117f 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -57,12 +57,17 @@ class CI_DB_odbc_driver extends CI_DB { protected $_count_string = 'SELECT COUNT(*) AS '; protected $_random_keyword; - public function __construct($params) { parent::__construct($params); $this->_random_keyword = ' RND('.time().')'; // database specific random keyword + + // Legacy support for DSN in the hostname field + if ($this->dsn == '') + { + $this->dsn = $this->hostname; + } } /** @@ -72,7 +77,7 @@ class CI_DB_odbc_driver extends CI_DB { */ public function db_connect() { - return @odbc_connect($this->hostname, $this->username, $this->password); + return @odbc_connect($this->dsn, $this->username, $this->password); } // -------------------------------------------------------------------- @@ -84,22 +89,7 @@ class CI_DB_odbc_driver extends CI_DB { */ public function db_pconnect() { - return @odbc_pconnect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @return void - */ - public function reconnect() - { - // not implemented in odbc + return @odbc_pconnect($this->dsn, $this->username, $this->password); } // -------------------------------------------------------------------- |