From ab7ef46b11420ee347d32d2ce060c0872b7d61f5 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 15 Jun 2015 12:54:44 +0530 Subject: [PATCH] Backquote column names in where clause Signed-off-by: Madhura Jayaratne --- js/pmd/history.js | 4 ++-- 1 file 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 "; } }