diff --git a/js/sql.js b/js/sql.js index 0d048343a..b531b1336 100644 --- a/js/sql.js +++ b/js/sql.js @@ -24,9 +24,17 @@ $(document).ready(function() { $(this).append(''); $.post($(this).attr('action'), $(this).serialize() , function(data) { - $("#sqlqueryresults").html(data); - if($("#togglequerybox").siblings(":visible").length > 0) { - $("#togglequerybox").trigger('click'); + if(data.success == true) { + PMA_ajaxShowMessage(data.message); + } + else if (data.success == false ) { + PMA_ajaxShowMessage(data.error); + } + else { + $("#sqlqueryresults").html(data); + if($("#togglequerybox").siblings(":visible").length > 0) { + $("#togglequerybox").trigger('click'); + } } }) }) // end SQL Query submit