Home arrow PHP arrow Page 7 - Doing More with phpMyAdmin (Part 2)

History Lesson - PHP

phpIn the first segment of this two-part tutorial, I gave you a quick overview of some of the interesting new features available in phpMyAdmin. In this concluding segment, find out how to use phpMyAdmin to define relationships between tables, maintain a log of commonly-used queries and create entity-relationship diagrams.

TABLE OF CONTENTS:
  1. Doing More with phpMyAdmin (Part 2)
  2. The Ground Work
  3. Total Recall
  4. Tangled Relationships
  5. Bookmark Bandit
  6. Looking Up the Dictionary
  7. History Lesson
By: Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 41
December 08, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
In the concluding section of this tutorial, I will look at two features that at first glance seem too trivial to discuss. However, they're both pretty useful, so let's take a look.

The first feature is phpMyAdmin's ability to keep track of all the SQL statements that you have executed within the session. In fact, this is very similar to a browser's history module, which stores all the Web sites that you have visited in the recent past. You can access this history list by using the SQL-history tab of the Query window, as seen here.

There are a couple of parameters that you can use to tweak for this interesting feature: the $cfg['QueryHistoryMax'] variable sets the maximum number of queries to be stored in the history buffer at any given point in time, while the $cfg['QueryHistoryDB'] variable tells phpMyAdmin whether to store the history list in a MySQL database or in JavaScript variables. If you choose the latter, the SQL history will be lost as soon as the Query window is closed. For all practical purposes, I recommend using the database option to ensure that your queries are stored in the history buffer for a longer duration.

Finally, phpMyAdmin allows you to not only customize its colors, but also its language. So, regardless of whether you're working in the freezing mountains of Siberia or struggling in the desert sands of Egypt, you can be sure that phpMyAdmin will be able to display the interface in your very own language.

To use this feature, simply navigate to the homepage of the application and use the Language drop-down list to change the language. Here's what the result might look like.

If you're one of the unfortunate few whose native language is not available in the drop-down list, don't despair: the phpMyAdmin development team is looking for people to translate the interface into other languages. Why not get in touch?

That's about it for this two-parter on the phpMyAdmin database administration tool. While the first part dealt with issues like installation, security, and analysis, I went a little further in this second part. I explained how you can effectively leverage on the interesting features offered by new versions of phpMyAdmin, beginning with a discussion of the mechanism to define relationships between tables and how phpMyAdmin can be used to ensure that bad data does not find its way into your tables. Next, I explained the bookmarks feature, which lets you remember important queries for future use, the procedure for generation of a database dictionary in PDF format on the fly, and wrapped things up with a quick look at the history and language capabilities of the application.

I hope you enjoyed reading this tutorial as much as I enjoyed writing it, and that it gave you some visibility of the true power and flexibility of phpMyAdmin. Until next time!

Note: All examples in this article have been tested on MySQL 4.0.14. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article.

 
 
>>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: