Bookmark phpMyAdmin queries Mar03 '05

phpMyAdmin is an excellent front–end GUI, for use in managing a MySQL database.

Lately, I’ve been aggravated at the lack of "customization" involved with the software. One thing I hate having to repeat is query results that I need access to often.

So, everytime I log into phpMyAdmin, I have to re–issue the query, to see the results.

What if there was a way to have phpMyAdmin go right to that query result set? In other words – bookmark a query result? Is that possible?

Good news. It is.

If your willing to get your hands a little dirty with URL encoding, you can manipulate phpMyAdmin to create any bookmarks to your liking.

URL encoding

First, a brief mention of URL encoding is in order.

URL encoding means certain special characters in your URL, such as a space, ampersand, quotation marks, must be escaped, in order to be rendered properly. Browsers can only handle a limited number of characters in the URL.

Below is a list of commonly escaped characters in a URL, with their proper escaped character next to them:

And, these characters above is all we’ll need to get started with phpMyAdmin bookmarks.

The query appended to the URL

Let’s take a look at an example phpMyAdmin URL, which is used to browse the contents of a table in the database:

http://www.yourserver.com/dh_phpmyadmin/db.yourserver.com/sql.php?lang=
en-iso-8859-1&server=1&db=ne&table=content&goto=tbl_properties.php&
sql_query=SELECT+%2A+FROM+%60content%60&pos=0

The part that is white is the part to edit. Using the URL escape characters from above, you can change the query to anything you want, and simply bookmark the entire URL.

For example, the URL above would send this query to your phpMyAdmin server:

SELECT * FROM `content`

This query is very simple, but of course, you can make it as complicated as you’d like.

Categories: PHP , Software , SQL , Tutorials

Add Feedback (view all)

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

matthom is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.

Contact Matt

Similar Entries

Stats

14 unique visits since August 2008

Syndicate

Advertisements