maybe_add_column()
maybe_add_column( string $table_name, string $column_na…
maybe_add_column( string $table_name, string $column_name, string $create_ddl )
将列添加到数据库表(如果该表不存在)。
Adds column to a database table if it doesn’t already exist.
将列添加到数据库表(如果该表不存在)。
Adds column to a database table if it doesn’t already exist.
目录锚点:#参数#返回#源码
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $table_name | (string) | 必需 | 要修改的表名。 |
| $column_name | (string) | 必需 | 要添加到表中的列名。 |
| $create_ddl | (string) | 必需 | 用于添加列的SQL语句。 |
返回(Return)
(bool)如果已存在或成功完成,则为True;如果出错,则为false。
源码(Source)
| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.3.0 | wp-admin/includes/upgrade.php:2400 | 0 | 2 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。


还没有任何评论,赶紧来占个楼吧!