From c8bde826c13f41a5cdd4ebefb23b690896ac6706 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Fri, 17 Oct 2008 22:43:42 +0000 Subject: Added port support to MS SQL --- system/database/drivers/mssql/mssql_driver.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'system/database/drivers/mssql/mssql_driver.php') diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 6130bf4cb..72dc263f3 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -50,6 +50,11 @@ class CI_DB_mssql_driver extends CI_DB { */ function db_connect() { + if ($this->port != '') + { + $this->hostname .= ','.$this->port; + } + return @mssql_connect($this->hostname, $this->username, $this->password); } @@ -63,6 +68,11 @@ class CI_DB_mssql_driver extends CI_DB { */ function db_pconnect() { + if ($this->port != '') + { + $this->hostname .= ','.$this->port; + } + return @mssql_pconnect($this->hostname, $this->username, $this->password); } -- cgit v1.2.3-24-g4f1b