wpdb::_do_query()privateWP 3.9.0

Internal function to perform the mysqli_query() call.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->_do_query( $query );
$query(строка) (обязательный)
The query to run.

Заметки

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

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

Код wpdb::_do_query() WP 6.4.3

private function _do_query( $query ) {
	if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
		$this->timer_start();
	}

	if ( ! empty( $this->dbh ) ) {
		$this->result = mysqli_query( $this->dbh, $query );
	}

	++$this->num_queries;

	if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
		$this->log_query(
			$query,
			$this->timer_stop(),
			$this->get_caller(),
			$this->time_start,
			array()
		);
	}
}