summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-10-18 00:43:42 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-10-18 00:43:42 +0200
commitc8bde826c13f41a5cdd4ebefb23b690896ac6706 (patch)
treeb0147fe5325b7abd345210feabb06332908c770e
parentd63414872ef6fc14b3a9ab65a8624d5e3fee3bc8 (diff)
Added port support to MS SQL
-rw-r--r--system/database/drivers/mssql/mssql_driver.php10
1 files changed, 10 insertions, 0 deletions
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);
}