如何在WordPress插件安装中创建MySql用户定义函数? [英] How to create a MySql user-defined function in a WordPress plugin installation?

查看:63
本文介绍了如何在WordPress插件安装中创建MySql用户定义函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个脚本,该脚本为MySql数据库创建了用户定义的函数(UDF).

I have written a script that creates a user-defined function (UDF) for the MySql database.

我需要这个UDF作为我用WordPress编写的插件.

I need this UDF for a plugin that I am writing in WordPress.

有什么方法可以从常规WordPress插件安装脚本中将此UDF添加到数据库中吗?(例如用于安装数据库表的"dbDelta"功能).

Is there any way to add this UDF to the database from within the regular WordPress plugin installation scripts? (such as the "dbDelta" function for installing database tables).

感谢您的帮助:-)

推荐答案

有什么方法可以从常规WordPress插件安装脚本中将此UDF添加到数据库中吗?(例如用于安装数据库表的"dbDelta"功能).

Is there any way to add this UDF to the database from within the regular WordPress plugin installation scripts? (such as the "dbDelta" function for installing database tables).

从文档中判断 dbDelta 函数采用任意SQL.只要所使用的任何底层机制都允许创建UDF,那么仅创建它就不会有问题.

Judging from the documentation, the dbDelta function takes arbitrary SQL. As long as whatever underlying mechanism that is being used allows UDFs to be created, then you should not have an issue simply creating it.

这篇关于如何在WordPress插件安装中创建MySql用户定义函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆