WordPress at a glance
функция не описана

wpdb::get_col_info() public WP 0.71

Retrieves column metadata from the last query.

It's a method of the class: wpdb{}

Хуков нет.

Возвращает

Mixed. Column results.

Использование

$wpdb = new wpdb();
$wpdb->get_col_info( $info_type, $col_offset );
$info_type(string)
Possible values include 'name', 'table', 'def', 'max_length', 'not_null', 'primary_key', 'multiple_key', 'unique_key', 'numeric', 'blob', 'type', 'unsigned', 'zerofill'.
Default: 'name'
$col_offset(int)
0: col name. 1: which table the col's in. 2: col's max length.
3: if the col is numeric. 4: col's type.
Default: -1

Changelog

Since 0.71 Introduced.

Код wpdb::get_col_info() WP 5.5.1

<?php
public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
	$this->load_col_info();

	if ( $this->col_info ) {
		if ( -1 === $col_offset ) {
			$i         = 0;
			$new_array = array();
			foreach ( (array) $this->col_info as $col ) {
				$new_array[ $i ] = $col->{$info_type};
				$i++;
			}
			return $new_array;
		} else {
			return $this->col_info[ $col_offset ]->{$info_type};
		}
	}
}