wpdb::load_col_info()protectedWP 3.5.0

Loads the column metadata from the last query.

Метод класса: wpdb{}

Хуков нет.

Возвращает

null. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->load_col_info();

Список изменений

С версии 3.5.0 Введена.

Код wpdb::load_col_info() WP 6.5.2

protected function load_col_info() {
	if ( $this->col_info ) {
		return;
	}

	$num_fields = mysqli_num_fields( $this->result );

	for ( $i = 0; $i < $num_fields; $i++ ) {
		$this->col_info[ $i ] = mysqli_fetch_field( $this->result );
	}
}