I have a handful of custom database commands that my admin users need to execute on an adhoc basis - it's some business logic that was unavailable in a normal plugin. The commands are all procedures that either execute successfully, or return a record set.
I want to be able to make these commands available through the Wordpress admin interface, ideally saving each query with a friendly name (eg Process1 - start of day) so that it is easier to execute but I haven't been able to find a solution. The admin users are slightly horrified by the likes of PHPMyAdmin for Wordpress, or even using SSH to get to a Bash menu script which executes database commands when options are selected.
I have a handful of custom database commands that my admin users need to execute on an adhoc basis - it's some business logic that was unavailable in a normal plugin. The commands are all procedures that either execute successfully, or return a record set.
I want to be able to make these commands available through the Wordpress admin interface, ideally saving each query with a friendly name (eg Process1 - start of day) so that it is easier to execute but I haven't been able to find a solution. The admin users are slightly horrified by the likes of PHPMyAdmin for Wordpress, or even using SSH to get to a Bash menu script which executes database commands when options are selected.
Share Improve this question asked May 5, 2019 at 14:42 Peter SchofieldPeter Schofield 1034 bronze badges1 Answer
Reset to default 2I don't know of a plugin that allows you to do this out of the box, but as you are (/seem to be) comfortable with database manipulation, I've outlined below how you can achieve what you want using custom coding.
You can run custom queries using the wpdb
-class. There are a few posts on WPSE/SO that treat this. Once you've set those up, you can run them on, for example, a custom admin page (a new page in the Wordpress Dashboard). There are various tutorials available online (such as this one) that show how that can be done.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745324133a4622577.html
评论列表(0条)