Skip to content
Michal Čihař edited this page May 16, 2016 · 3 revisions

Select Tables

The following bookmarklet will prompt you for a search pattern. In the tables overview, it will then check each checkbox for a table name that matches the search pattern:

[javascript:(function](javascript:(function)(){var pat=prompt('Enter the search pattern for the table name:','');if(pat){var inputs=frames['frame_content'].document.getElementsByTagName('input');for(var i=0;i<inputs.length;i++){if(inputs[i].name=='selected_tbl[]'){inputs[i].checked=inputs[i].value.match(pat);}}}})()


javascript:( function() { var pat = prompt('Enter the search pattern for the table name:', ''); if (pat) { var inputs = frames['frame_content'].document.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++) { if (inputs[i].name == 'selected_tbl[]') { inputs[i].checked = inputs[i].value.match(pat); } } } } )()

Copy the whole line into a URL field of a bookmark - then you can use it in PMA.

Clone this wiki locally