Added port support to MS SQL
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 6130bf4..72dc263 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -50,6 +50,11 @@
*/
function db_connect()
{
+ if ($this->port != '')
+ {
+ $this->hostname .= ','.$this->port;
+ }
+
return @mssql_connect($this->hostname, $this->username, $this->password);
}
@@ -63,6 +68,11 @@
*/
function db_pconnect()
{
+ if ($this->port != '')
+ {
+ $this->hostname .= ','.$this->port;
+ }
+
return @mssql_pconnect($this->hostname, $this->username, $this->password);
}