Backquote column names in where clause
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
d15ae83b17
commit
ab7ef46b11
@ -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 ";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user