Edit MySQL Table Cells Quickly in phpMyAdmin
While going about my day-to-day usage of phpMyAdmin, I stumbled across a faster way to edit information in a database table. There is no need to click the Edit link for a row and wait for the page to reload. Just be aware that there is a bug in the most recent version of phpMyAdmin.
Background
When writing queries in PHP, it is common for me to double click cells in a database table. Double clicking typically highlights a word / value so that it can be copied and pasted into a query. With the newest version of phpMyAdmin (version 4.6.2), I was presently surprised by a new feature.
Edit Cells Quickly
Let's say we have a database table containing the names of everyone working for a company. And Mike Miller asked for his name to be changed to Michael Miller. Instead of clicking the Edit link for his database record, you can double click "Mike" in phpMyAdmin and the cell is replaced with a textbox for editing the value (see Figure 1).
After fixing the name, press Enter on the keyboard to commit the changes.
Bug in New Feature
While the new feature makes editing individual cells easier, there is one small issue to be aware of. Let's say the last name field in the database is set to only allow 30 characters. And Jon mentions that his last name is not correct, it should be Wolfeschlegelsteinhausenbergerdorff. If we double click the incorrect last name and enter the 35-character name, phpMyAdmin displays an error message (see Figure 2).
My first reaction was to click the Structure tab and increase the limit for the last name field. But that causes phpMyAdmin to display a slightly different error message (see Figure 3) which keeps popping up every time you switch tabs.
To get rid of the message, you can utilize a feature in phpMyAdmin which forces the page to reload, such as clicking an Edit link for one of the database records. You should then see a message asking if you want to leave the site (see Figure 4).
Or you could just close the browser window, open a new window, and open phpMyAdmin again.
0 Comments
There are currently no comments.
Leave a Comment