From 96fe476de34995ccedd6d64873eb5eb8d3e5a180 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Fri, 12 Oct 2012 02:20:42 +0530 Subject: [PATCH] Fix bug #3575799 --- js/tbl_select.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/js/tbl_select.js b/js/tbl_select.js index f0558dcae1..7658eaf5bd 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -43,6 +43,13 @@ $(document).ready(function() { * @uses PMA_ajaxShowMessage() */ $("#tbl_search_form.ajax").live('submit', function(event) { + + var unaryFunctions = [ + 'IS NULL', + 'IS NOT NULL', + "= ''", + "!= ''"]; + // jQuery object to reuse $search_form = $(this); event.preventDefault(); @@ -65,8 +72,13 @@ $(document).ready(function() { } }); var columnCount = $('select[name="param[]"] option').length; - // Submit values only for the columns that have a search criteria + // Submit values only for the columns that have unary column operator or a search criteria for (var a = 0; a < columnCount; a++) { + + if ($.inArray(values['func[' + a + ']'], unaryFunctions) >= 0) { + continue; + } + if (values['fields[' + a + ']'] == '') { delete values['fields[' + a + ']']; delete values['func[' + a + ']'];