Fix: mysqli works on localhost

This commit is contained in:
Laurent Destailleur
2008-08-07 17:11:05 +00:00
parent d7a8e44db5
commit 93ee75291d
2 changed files with 5 additions and 2 deletions

View File

@@ -231,8 +231,9 @@ class DoliDb
{
dolibarr_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG);
// With mysql, port must be in hostname
$newhost=$host;
// With mysql, port must be in hostname
if ($port) $newhost.=':'.$port;
$this->db = @mysql_connect($newhost, $login, $passwd);