PHPMyAdmin - How to Save Queries
Asked Answered
T

5

24

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.

Titi answered 5/12, 2016 at 22:36 Comment(0)
S
19

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.

Sap answered 6/12, 2016 at 20:9 Comment(0)
D
0

On the PHPMyAdmin SQL section, you will put your procedural query and save this query as a bookmark which you will see on the lower side of the page which I indicate with a red arrow. It's a good idea but you can also try to save your query on PHP function and run them using a function call. Like Codeigniter has a model in which you can write a query and run that using the query() method.

enter image description here

Dejected answered 5/8, 2022 at 7:34 Comment(0)
A
0

The bookmarked query is your saved query on the below SQL section(tab) on phpMyadmin

In, the SQL tab below you can select the "Bookmarked SQL query" option in this select a particular query

This also used for saved queries on PHPMyAdmin.

Allude answered 27/10, 2023 at 9:25 Comment(0)
L
0

Saving the query as view is a quick and easy alternative if the configuration is missing. (Or you can't get to it like I never can working for multiple clients on shared web servers across many different hosting providers. It's never setup, and no permissions to modify it.) I don't have the time or inclination to install a separate instance of phpmysadmin so I can have my way with it. Prefer to keep my strings in OneDrive so they are available to me everywhere.

Lissie answered 10/4 at 7:52 Comment(0)
E
-1

You need to have configured the phpMyAdmin configuration storage for using bookmarks feature.

Endurable answered 24/10, 2020 at 13:51 Comment(1)
Identical (but far less detailed) to an existing answer submitted four years earlier. Recommendation: delete this answer (at which point lost rep will be returned).Mcripley

© 2022 - 2024 — McMap. All rights reserved.