diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-18 00:30:31 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-18 00:30:31 +0200 |
commit | d22e53b6c5ea602900199360454b29c6e72d5b86 (patch) | |
tree | 13bf1dece13302e4eeb7bb288177cda68f3cf298 /system/database/drivers | |
parent | 56d7daa73b80359b26c878d341d90e8c2a36ec1e (diff) |
Added support for the port setting in mysql
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 34b6012cd..e0a1cee7d 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -58,6 +58,11 @@ class CI_DB_mysql_driver extends CI_DB { */
function db_connect()
{
+ if ($this->port != '')
+ {
+ $this->hostname .= ':'.$this->port;
+ }
+
return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
}
@@ -71,6 +76,11 @@ class CI_DB_mysql_driver extends CI_DB { */
function db_pconnect()
{
+ if ($this->port != '')
+ {
+ $this->hostname .= ':'.$this->port;
+ }
+
return @mysql_pconnect($this->hostname, $this->username, $this->password);
}
|