check_column()

check_column()函数是Wordpress函数,检查列是否符合条件。

check_column( string $table_name, string $col_name, string $col_type, bool $is_null = null, mixed $key = null, mixed $default = null, mixed $extra = null )

说明(Description)

使用SQL DESC检索列的表信息。如果您进一步研究SQL语句返回的列信息,它将有助于理解参数。传入null以跳过检查该条件。

从DESC表返回的列名区分大小写并列出:字段类型Null Key默认值Extra


参数(Parameters)

参数类型必填说明
$table_name(string)必需表名
$col_name(string)必需列名
$col_type(string)必需列类型
$is_null(bool)可选检查为空。
$key(mixed)可选关键信息。
$default(mixed)可选默认值。
$extra(mixed)可选额外价值。

返回(Return)

(bool)如果匹配,则为True。如果不匹配,则为False。


源码(Source)

//暂无
更新版本源码位置使用被使用
1.0.0wp-admin/install-helper.php:16801 function
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索