Проблему решил добавлением
Code: Select all
SET NAMES 'utf8'
Code: Select all
function _connect($host = "", $username = "", $password = "", $database = "", $persistent, $forcenew)
{
if (!function_exists('mysql_connect')) return false;
$this->host = $host;
if (!empty($this->port)) $this->host .= ":" . $this->port;
$this->username = $username;
$this->password = $password;
$this->database = $database;
$this->persistent = $persistent;
$this->forcenewconnection = $forcenew;
if($this->persistent == 1)
{
if (strnatcmp(PHP_VERSION, '4.3.0') >= 0)
$this->connectionId = @mysql_pconnect( $this->host, $this->username, $this->password, $this->clientFlags );
else
$this->connectionId = @mysql_pconnect( $this->host, $this->username, $this->password );
}
else
{
if (strnatcmp(PHP_VERSION, '4.3.0') >= 0)
$this->connectionId = @mysql_connect( $this->host, $this->username, $this->password, $this->forcenewconnection, $this->clientFlags );
else if (strnatcmp(PHP_VERSION, '4.2.0') >= 0)
$this->connectionId = @mysql_connect( $this->host, $this->username, $this->password, $this->forcenewconnection );
else
$this->connectionId = @mysql_connect( $this->host, $this->username, $this->password );
}
if ($this->connectionId === false)
{
if ($fn = $this->raiseErrorFn)
$fn($this->dbtype, 'CONNECT', $this->ErrorNo(), $this->ErrorMsg(), $this->host, $this->database, $this);
return false;
}
if (!empty($this->database))
{
if($this->SelectDB( $this->database ) == false)
{
$this->connectionId = false;
return false;
}
}
mysql_query("SET NAMES 'utf8'");
return true;
}