From c1d7d986f40353c56247533a7ad7bcacaaf056fd Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 22 Jul 2013 09:46:13 -0400 Subject: [PATCH] Comparison does not work when the array element does not exist, leading to an incorrect sql query generated --- js/tbl_zoom_plot_jqplot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 17aba659702a..fe7dcf35f324 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -362,7 +362,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () { // other } else { // type explicitly identified - if (sqlTypes[key] !== null) { + if (sqlTypes[key] != null) { if (sqlTypes[key] == 'bit') { sql_query += "b'" + value + "', "; } @@ -376,6 +376,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () { } } } + // remove two extraneous characters ', ' sql_query = sql_query.substring(0, sql_query.length - 2); sql_query += ' WHERE ' + PMA_urldecode(searchedData[searchedDataKey].where_clause);