diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-18 00:43:42 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-18 00:43:42 +0200 |
commit | c8bde826c13f41a5cdd4ebefb23b690896ac6706 (patch) | |
tree | b0147fe5325b7abd345210feabb06332908c770e /system | |
parent | d63414872ef6fc14b3a9ab65a8624d5e3fee3bc8 (diff) |
Added port support to MS SQL
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 10 |
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);
}
|