From d22e53b6c5ea602900199360454b29c6e72d5b86 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Fri, 17 Oct 2008 22:30:31 +0000 Subject: Added support for the port setting in mysql --- system/database/drivers/mysql/mysql_driver.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'system/database/drivers/mysql/mysql_driver.php') 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); } -- cgit v1.2.3-24-g4f1b