Chapter 14. Using Query Bookmarks

This chapter covers query bookmarks—one of the features of the phpMyAdmin configuration storage. Being able to label queries, and recall them by label, can be a real time saver. Bookmarks are queries that have the following properties:

  • Stored permanently
  • Viewable
  • Erasable
  • Related to one database
  • Recorded only as a consequence of a user's action
  • Labeled
  • Private by default (only available to the user creating them) but possibly public

A bookmark can also have a variable part, as explained in the Passing a parameter to a bookmark section later in this chapter.

There is no bookmark page for managing bookmarks. Instead, the various actions for bookmarks are available on specific pages, such as results pages or query box pages.

Comparing bookmark and query history features

In Chapter 11, we learned about the SQL history feature, which automatically stores queries (temporarily or permanently). There are similarities between queries stored in the history and bookmarks. After all both features are intended to store queries for later execution. However, there are important differences regarding the way the queries are stored and the action that triggers the recording of a query.

Storing of queries in the history is automatic; whereas a query is saved as a bookmark via an explicit request from the user. Also, there is a configurable limit (refer to Chapter 11) on the number of queries stored in the permanent history; however, the number of bookmarks is not limited. Finally, the history feature presents the queries in the reverse order of the time they were sent. However, bookmarks are shown by label (not showing the query text directly).

To summarize, the automatic query history is useful when we neither plan to recall a query, nor wish to remember which queries we typed. This contrasts with the bookmark facility where we intentionally ask the system to remember a query, and even give it a name (label). Therefore, we can do more with bookmarks than with the query history, but both features have their own importance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.151