Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-05-16 03:00:42 +0400
committermattab <matthieu.aubry@gmail.com>2014-05-16 03:00:42 +0400
commit12c2146a1e2cac328088127702e803f88aaec603 (patch)
tree177df38f810ea81d9f97d9df9ecf67dc815f5c39 /core/Option.php
parentc04ddf6f6de3eb9df1ff192af6728877a408b7f9 (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.php2
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();