From 7f835c102006b3e9cd9e459379b9357babb7c1b7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 1 Oct 2005 08:53:38 +0000 Subject: [PATCH] mysqli has a separete param for the port --- phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php b/phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php index 22823a52c2..3d4e554134 100644 --- a/phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php +++ b/phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php @@ -85,7 +85,7 @@ class ADODB_mysqli extends ADOConnection { mysqli_options($this->_connectionID,$arr[0],$arr[1]); } - if (!empty($this->port)) $argHostname .= ":".$this->port; + if (strstr($argHostname,':')) list($argHostname,$this->port) = explode(':',$argHostname); $ok = mysqli_real_connect($this->_connectionID, $argHostname, $argUsername, @@ -94,7 +94,7 @@ class ADODB_mysqli extends ADOConnection { $this->port, $this->socket, $this->clientFlags); - + if ($ok) { if ($argDatabasename) return $this->SelectDB($argDatabasename); return true;