From 04435798b1cd2db6d2abcd50d61d1d529ed4a486 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 15 Jun 2015 12:42:01 +0530 Subject: [PATCH] Use backquotes. Consistently skip using db name Signed-off-by: Madhura Jayaratne --- js/pmd/history.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/pmd/history.js b/js/pmd/history.js index 77364617fc..ce2db1737f 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -653,7 +653,7 @@ function query_from() from_array = unique(from_array); tab_left = from_array; temp = tab_left.shift(); - quer = temp; + quer = '`' + temp + '`'; tab_used.push(temp); // if master table (key2) matches with tab used get all keys and check if tab_left matches // after this check if master table (key2) matches with tab left then check if any foreign matches with master . @@ -667,7 +667,7 @@ function query_from() parts1 = contr[K][key][key2][key3][0].split("."); if (found(tab_left, parts1[1]) > 0) { query += "\n" + 'LEFT JOIN '; - query += '`' + parts1[0] + '`.`' + parts1[1] + '` ON '; + query += '`' + parts1[1] + '` ON '; query += '`' + parts[1] + '`.`' + key3 + '` = '; query += '`' + parts1[1] + '`.`' + contr[K][key][key2][key3][1] + '` '; t_tab_left.push(parts1[1]); @@ -691,7 +691,7 @@ function query_from() parts1 = contr[K][key][key2][key3][0].split("."); if (found(tab_used, parts1[1]) > 0) { query += "\n" + 'LEFT JOIN '; - query += '`' + parts[0] + '`.`' + parts[1] + '` ON '; + query += '`' + parts[1] + '` ON '; query += '`' + parts1[1] + '`.`' + contr[K][key][key2][key3][1] + '` = '; query += '`' + parts[1] + '`.`' + key3 + '` '; t_tab_left.push(parts[1]);