check_column

SummerySummery

Check column matches criteria.

Syntax

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

DescriptionDescription

Uses the SQL DESC for retrieving the table info for the column. It will help understand the parameters, if you do more research on what column information is returned by the SQL statement. Pass in null to skip checking that criteria.

Column names returned from DESC table are case sensitive and are listed: Field Type Null Key Default Extra

ParametersParameters

$table_name

(string) (Required) Table name

$col_name

(string) (Required) Column name

$col_type

(string) (Required) Column type

$is_null

(bool) (Optional) Check is null.

Default value: null

$key

(mixed) (Optional) Key info.

Default value: null

$default

(mixed) (Optional) Default value.

Default value: null

$extra

(mixed) (Optional) Extra value.

Default value: null

ReturnReturn

(bool) True, if matches. False, if not matching.

SourceSource

File: wp-admin/install-helper.php


			

ChangelogChangelog

Changelog
Version Description
1.0.0 Introduced.
Scroll to Top