mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
DB/SQL-Modes
* force disable special modes that will prevent our funny queries
This commit is contained in:
@@ -36,9 +36,12 @@ class DB
|
|||||||
if ($options['prefix'])
|
if ($options['prefix'])
|
||||||
$interface->setIdentPrefix($options['prefix']);
|
$interface->setIdentPrefix($options['prefix']);
|
||||||
|
|
||||||
// kill STRICT_TRANS_TABLES and STRICT_ALL_TABLES off. It prevents usage of implicit default values.
|
// disable STRICT_TRANS_TABLES and STRICT_ALL_TABLES off. It prevents usage of implicit default values.
|
||||||
if ($idx == DB_AOWOW)
|
if ($idx == DB_AOWOW)
|
||||||
$interface->query('SET SESSION sql_mode = \'NO_ENGINE_SUBSTITUTION\'');
|
$interface->query("SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION'");
|
||||||
|
// disable ONLY_FULL_GROUP_BY (Allows for non-aggregated selects in a group-by query)
|
||||||
|
else
|
||||||
|
$interface->query("SET SESSION sql_mode = ''");
|
||||||
|
|
||||||
self::$interfaceCache[$idx] = &$interface;
|
self::$interfaceCache[$idx] = &$interface;
|
||||||
self::$connectionCache[$idx] = true;
|
self::$connectionCache[$idx] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user