A WordPress plugin/Dashboard Widget that allows you to connect to any database and edit the contents.
This plugin is a dashboard widget to allow you to connect to any MySQL database of your choice (as long as your hosting allows) and search, edit, add and delete records in an easy to use interface. Ideal if you have built a site referencing another database. You can allow other editors/administrators of the site to alter, update, delete, add and correct entries without having to give them the full capabilities of administration tools such as phpMyAdmin.
If you find this plug-in useful then please rate it, thanks.
Installation
To install, download the .zip file from the link below, extract the contents and place the edit-any-table folder in your plugin directory (typically \\your-site\wp-content\plugins\)
Setup
Once installed go to the Dashboard->Plugins page of your WordPress site and activate the plugin:
Now go to the Dashboard->Settings->Edit Any Table page and enter the required details:
First you’ll need to enter the host (often localhost), the name of the database you wish to connect to and a valid user name and password. Under Admin Settings you can choose to allow Administrators only to have access to the widget or Editors as well. Note: If neither of these boxes are ticked the widget will not display in your WordPress Dashboard. You can choose what to allow the Editor to do i.e. Add, Edit and/or Delete. Leaving these boxes unchecked will give the Editor view only access. Display Settings allows you to select the maximum number of columns to display for returned searches. Edit Any Table displays best in a single column dashboard configuration and I find five columns is a comfortable fit but adjust to suit. Here you can also select to apply a friendly name for your connected database, this can help to assure editors (who don’t have access to the settings) they are working on the correct records. Finally, if you don’t want Edit Any Table to display as a widget then you can choose to have it rendered in its own separate admin page. Tables, if you have entered your database credentials correctly and saved them, you will get a list of all the tables. Select which ones you would like to be accessed via the admin screen.
You will also notice that at the top of the settings page is an option to switch debug mode on or off. Switching it on will display all the SQL sent to your database and may help identify and issues or strange results you may be getting.
Using Edit Any Table
Once configured return to the dashboard and you should see the following widget:
Now choose a table from the drop down list and select Open Note: If there is nothing in the list then you have either not entered the correct details in your settings or there are no tables in your database.
Here you can either search or add a new record with the values you have entered. Entering no search criteria returns all the records from the table. To clear any values hit the Reset button. If you enter values that are not of the correct type or in the wrong format when adding a new record these values will be substituted for the database defaults. Wild cards do not work in searches but by selecting the ‘Fuzzy’ check box Edit Any Table will look for the phrase or part word you entered within any string field i.e. entering ‘Liz’ in a first name field could return Elizabeth, Liz or Lizzy. Please be aware that fuzzy searches can take a lot longer when searching large datasets. Any time you want to return to this screen just select the Open button again.
These are the search results for a search against the AString field using the phrase hello:
Now you can edit the record contents or delete a record. To return to the search/add record screen just select Open again. That’s it, enjoy.
Known Issues / Features
- There is no bulk update or delete
- After saving you are not returned to the previously displayed records
- Cannot search blobs
- Using reserved words as column names can cause issues
Please Note
To use this plugin you need a basic knowledge of database design and setup. Modifying records can have unpredictable results so if you are at all unsure I would suggest creating a test table first before using in anger.
DOWNLOAD LATEST VERSION OF PLUGIN
If you have a support question or have discovered a bug in Edit-Any-Table then please post here
How can I bring Edit Any Table to the front page?
I have installed and activated – but no widget appearing in dashboard. I am using WP 4.4.1
Any yhoughts?
! still there. Amy one that have some hints?
It’s in Dashboard / Home (Welcome to WordPress!) if it’s a widget, or besides Home and Updates if it’s not a widget (a Separate Admin Page).
Hi, for some strange reason it is returning an incomplete dataset. For example, I have about 50 users setup on my site but when i query the users table it is only returning the first 20, ie, I can only go to ‘Next Page’ once (with 10 a page displayed) and then the only option is ‘Previous Page’
Good plugin, looks to progress really well.
Could you consider 2 things
(1) a select All tables checkbox, saving the need to check everyone.
(2) display table columns vertically, so you can see much more data on the scereen. Currently you only permit a max of 10 fields across the page, but with vertical columns, you see many more fields, only dependent on scrolling the window.
Bug: settings page: keeps auto loading incorrect password from a previous bad attempt to connect (in the end i had to reset database password wordpress user to none, for your plugin too work).
Cheers
Hello,
the plugin works only partially. I am supposed to have access to edit columns (all checked for admin and editor) but I can only add new rows without being able to change existing ones.
Best,
Ivan
Hi Ivan, this is a tough one as I think Edit Any Table is working correctly and I assume, as you can see the settings page you are Admin. I think, maybe, you need to check the permissions of the account that you are using to access your database and ensure that this account has full access.
The account indeed has all permissions enabled regarding the particular database.
Best,
Ivan
Hi Ivan – I have added a debug mode on the settings page which may help you resolve your issue.
Hi,
Fantastic Plugin, is there any way of embedding this on a webpage on my site rather than my dashboard. I need to allow access to it by a third party but not through my dashboard. I’m thinking of putting it on a password protected page. Can you help.
Thanks
Gary
I have been asked for this a couple of times now so may include the functionality in the next release.
I hope you are able to do this. I am looking for a way to have my database searchable by my viewers.
Was this every added? I would like to do the same.
I can open the table that I want to edit but always get “No results found” message. I have tried searching the wp_users table and wp_posts table. Both tables do have entries. Even a blind search produces nothing.
This issue is usually caused by an incorrect password. If your problem persists please post on the plugin support page: http://wordpress.org/support/plugin/edit-any-table
is it possible to embed the query form in a front-end page? without editing permissions of course.
Thanks
Not at present, I’m sorry. If demand for this feature increases I may include it in a future release. Thank you for your feedback.
I wold like this feature.
How to restrict Number of tables to display in drop down box
in my case i want to show only first 3 tables or
how to call only selected tables
This functionality is now available in the latest release. Enjoy!
initially my table was empty . when I manually filled a row then the columns and valued fields appeared.
Yes – I was going to ask if the table was empty. I’ll add that to the list of known issues and will allow for empty tables in the next release.
I installed the plugin and Configured the settings as suggested. In my dashboard the interface displays the database and the tables within it. But on clicking on the ‘open, button the ‘column’ and ‘value’ don’t occur.What might be the problem?
http://www.flickr.com/photos/90949832@N04/8692598720/
How can I make a search in a DB without using wildcards?
When I wrote this plugin I was referencing data by key I.D.’s so there was no need, however I will try to squeeze wild card searching into the next release. Thanks for using Edit-any-Table
Fuzzy search has now been added to this plugin.