Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPMyAdmin - How to Save Queries

Tags:

phpmyadmin

Is there a way to get PHPMyAdmin to save the queries that you enter manually through the SQL tab? I don't want it to save every single query it runs for obvious reasons, I just want to be able to save the ones I enter in there, cuz some of them are very useful, and sometimes I forget how I did it afterwards.

like image 943
Horse O'Houlihan Avatar asked Dec 05 '16 22:12

Horse O'Houlihan


People also ask

How do I bookmark a query in phpMyAdmin?

To run the bookmarked query, select the database your query is for (usually in the left-hand column in phpMyAdmin). Then go to "SQL" at the top of the screen. You should then see a section on the page called "Bookmarked SQL query" with a drop-down selector for any bookmarked SQL queries you have.

How do I save a query in mysql?

To save a snippet of code entered into the query editor, click Save SQL to Snippets List ( ) from the SQL query toolbar, enter a name (optional), and click OK.


1 Answers

Sure, once you configure the "phpMyAdmin configuration storage" features, you can use the bookmarked query feature to save and recall arbitrary SQL queries.

Bookmark feature

Here you can see the standard SQL query window; above the Delimiter area you can see the place to give a query a name and create a bookmark (simply enter a name here and run the query; this saves it automatically).

Under the "Bookmarked SQL query" region, you can see the dropdown to select an existing bookmark (here I've selected the "bookmark demo" and selected to "view only" rather than actually executing the query. I find this feature quite handy.

You may also be interested in the History feature, which is available through the "Console" text at the very bottom of the screen.

like image 195
Isaac Bennetch Avatar answered Sep 18 '22 14:09

Isaac Bennetch