diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-05-16 03:00:42 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-05-16 03:00:42 +0400 |
commit | 12c2146a1e2cac328088127702e803f88aaec603 (patch) | |
tree | 177df38f810ea81d9f97d9df9ecf67dc815f5c39 /core/Option.php | |
parent | c04ddf6f6de3eb9df1ff192af6728877a408b7f9 (diff) |
When Piwik is installed without DB table prefix, the table 'option' becomes a Mysql reserved word.
Add quote identifier to prevent error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corr
Diffstat (limited to 'core/Option.php')
-rw-r--r-- | core/Option.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Option.php b/core/Option.php index 4a98138da0..5d39866454 100644 --- a/core/Option.php +++ b/core/Option.php @@ -214,7 +214,7 @@ class Option protected function getNameLike($name) { - $sql = 'SELECT option_name, option_value FROM ' . Common::prefixTable('option') . ' WHERE option_name LIKE ?'; + $sql = 'SELECT option_name, option_value FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?'; $bind = array($name); $result = array(); |