mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 13:48:55 +00:00
direct calls
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8815 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2fcd96ca72
commit
7a11fdbb64
1 changed files with 3 additions and 5 deletions
|
@ -51,14 +51,12 @@ class dbal_mysql extends dbal
|
||||||
if (@mysql_select_db($this->dbname, $this->db_connect_id))
|
if (@mysql_select_db($this->dbname, $this->db_connect_id))
|
||||||
{
|
{
|
||||||
// Determine what version we are using and if it natively supports UNICODE
|
// Determine what version we are using and if it natively supports UNICODE
|
||||||
$this->sql_server_info();
|
if (version_compare($this->sql_server_info(true), '4.1.3', '>='))
|
||||||
|
|
||||||
if (version_compare($this->sql_server_version, '4.1.3', '>='))
|
|
||||||
{
|
{
|
||||||
@mysql_query("SET NAMES 'utf8'", $this->db_connect_id);
|
@mysql_query("SET NAMES 'utf8'", $this->db_connect_id);
|
||||||
|
|
||||||
// enforce strict mode on databases that support it
|
// enforce strict mode on databases that support it
|
||||||
if (version_compare($this->sql_server_version, '5.0.2', '>='))
|
if (version_compare($this->sql_server_info(true), '5.0.2', '>='))
|
||||||
{
|
{
|
||||||
$result = @mysql_query('SELECT @@session.sql_mode AS sql_mode', $this->db_connect_id);
|
$result = @mysql_query('SELECT @@session.sql_mode AS sql_mode', $this->db_connect_id);
|
||||||
$row = @mysql_fetch_assoc($result);
|
$row = @mysql_fetch_assoc($result);
|
||||||
|
@ -83,7 +81,7 @@ class dbal_mysql extends dbal
|
||||||
@mysql_query("SET SESSION sql_mode='{$mode}'", $this->db_connect_id);
|
@mysql_query("SET SESSION sql_mode='{$mode}'", $this->db_connect_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (version_compare($this->sql_server_version, '4.0.0', '<'))
|
else if (version_compare($this->sql_server_info(true), '4.0.0', '<'))
|
||||||
{
|
{
|
||||||
$this->sql_layer = 'mysql';
|
$this->sql_layer = 'mysql';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue