Skip to content

Commit

Permalink
Comparison does not work when the array element does not exist, leadi…
Browse files Browse the repository at this point in the history
…ng to an incorrect sql query generated
  • Loading branch information
lem9 committed Jul 22, 2013
1 parent fe361f6 commit c1d7d98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/tbl_zoom_plot_jqplot.js
Expand Up @@ -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 + "', ";
}
Expand All @@ -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);

Expand Down

0 comments on commit c1d7d98

Please sign in to comment.