summaryrefslogtreecommitdiffstats
path: root/system/database/DB.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-03 00:35:55 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-03 00:35:55 +0100
commitc34e578c4bf993481381b1efb8f95089482135a4 (patch)
treeae274e27b427701ae0647f40403afdfdb44eabf0 /system/database/DB.php
parent20aa2bd6d852530b3d4b2e76076fe7e7b48bf148 (diff)
added stricton db config item to force strict mode - good for ensuring strict sql during development
Diffstat (limited to 'system/database/DB.php')
-rw-r--r--system/database/DB.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/database/DB.php b/system/database/DB.php
index 6930411c7..a91ca08fa 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -137,6 +137,11 @@ function &DB($params = '', $active_record_override = NULL)
$DB->initialize();
}
+ if (isset($params['stricton']) && $params['stricton'] == TRUE)
+ {
+ $DB->query('SET SESSION sql_mode="STRICT_ALL_TABLES"');
+ }
+
return $DB;
}