admin管理员组文章数量:1421730
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.
本文标签: mysqlWordpress plugins for database queries
版权声明:本文标题:mysql - Wordpress plugins for database queries 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745324132a2653512.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论