check_column


check_column ( $table_name, $col_name, $col_type, $is_null = null, $key = null, $default_value = null, $extra = null )

Parameters:
  • (string) table_name Database table name.
  • (string) col_name Table column name.
  • (string) col_type Table column type.
  • (bool) is_null Optional. Check is null.
  • (mixed) key Optional. Key info.
  • (mixed) default_value Optional. Default value.
  • (mixed) extra Optional. Extra value.
Returns:
  • (bool) True, if matches. False, if not matching.
Defined at:

Description

Checks that database table column matches the criteria.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 as listed: - Field - Type - Null - Key - Default - Extra

Related Functions

check_comment, the_comment, check_comment_flood_db, wp_check_comment_flood, maybe_add_column

Top Google Results

User discussions

wpseek mobile