diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-06-15 10:24:44 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-06-15 10:24:44 +0300 |
commit | ab7ef46b11420ee347d32d2ce060c0872b7d61f5 (patch) | |
tree | e31e731adab06585db62128bea431905db0dd347 /js/pmd | |
parent | d15ae83b17142d58a95d7273773b03438146ab6c (diff) |
Backquote column names in where clause
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/pmd')
-rw-r--r-- | js/pmd/history.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/pmd/history.js b/js/pmd/history.js index 406c8be7b6..2d93ef8fd1 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -574,10 +574,10 @@ function query_where() for (i = 0; i < history_array.length;i++) { if (history_array[i].get_type() == "Where") { if (history_array[i].get_and_or() === 0) { - and += "( " + history_array[i].get_column_name() + " " + history_array[i].get_obj().getrelation_operator() + " " + history_array[i].get_obj().getquery() + ")"; + and += "( `" + history_array[i].get_column_name() + "` " + history_array[i].get_obj().getrelation_operator() + " " + history_array[i].get_obj().getquery() + ")"; and += " AND "; } else { - or += "( " + history_array[i].get_column_name() + " " + history_array[i].get_obj().getrelation_operator() + " " + history_array[i].get_obj().getquery() + ")"; + or += "( `" + history_array[i].get_column_name() + "` " + history_array[i].get_obj().getrelation_operator() + " " + history_array[i].get_obj().getquery() + ")"; or += " OR "; } } |