function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) { if (ADODB_PHPVER >= 0x4300) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect,$this->clientFlags); else if (ADODB_PHPVER >= 0x4200) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect); else $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword); if ($this->_connectionID === false) return false; + @mysql_query("SET NAMES 'utf8'", $this->_connectionID); if ($argDatabasename) return $this->SelectDB($argDatabasename); return true; }
function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) { if (ADODB_PHPVER >= 0x4300) $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags); else $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword); if ($this->_connectionID === false) return false;+ @mysql_query("SET NAMES 'utf8'", $this->_connectionID); if ($this->autoRollback) $this->RollbackTrans(); if ($argDatabasename) return $this->SelectDB($argDatabasename); return true; }