Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lerni/d7a61863e8c4842d52aaa14c8a2f5280 to your computer and use it in GitHub Desktop.
Save lerni/d7a61863e8c4842d52aaa14c8a2f5280 to your computer and use it in GitHub Desktop.
diff --git a/model/connect/MySQLDatabase.php b/model/connect/MySQLDatabase.php
index f0628e4..db011c4 100644
--- a/model/connect/MySQLDatabase.php
+++ b/model/connect/MySQLDatabase.php
@@ -42,7 +42,7 @@ class MySQLDatabase extends SS_Database {
$this->connector->connect($parameters);
// This is important!
- $this->setSQLMode('ANSI');
+ $this->setSQLMode('REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE');
if (isset($parameters['timezone'])) {
$this->selectTimezone($parameters['timezone']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment