diff --git a/js/functions.js b/js/functions.js
index 699a0fe11..447d1c648 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1718,5 +1718,10 @@ $(document).ready(function(){
$("#btnDiscard").live("click",function(){
$(".sql").html(""+$oldText+"");
});
+
+ jQuery('.sqlbutton').click(function(evt){
+ insertQuery(evt.target.id);
+ return false;
+ });
});
diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php
index f7638ecb1..e00c1b8cd 100644
--- a/libraries/sql_query_form.lib.php
+++ b/libraries/sql_query_form.lib.php
@@ -298,11 +298,11 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter
.$auto_sel . $locking . '>' . htmlspecialchars($query) . '' . "\n";
// Add buttons to generate query easily for select all,single select,insert,update and delete
if(count($fields_list)) {
- echo '';
- echo '';
- echo '';
- echo '';
- echo '';
+ echo '';
+ echo '';
+ echo '';
+ echo '';
+ echo '';
}
echo '' . "\n";