WordPress at a glance
function is not described

wpdb::_do_query() private WP 3.9.0

Internal function to perform the mysql_query() call.

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

No Hooks.

Return

Null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->_do_query( $query );
$query(string) (required)
The query to run.

Notes

  • See: wpdb::query()

Changelog

Since 3.9.0 Introduced.

Code of wpdb::_do_query() WP 5.5.1

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

	if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
		$this->result = mysqli_query( $this->dbh, $query );
	} elseif ( ! empty( $this->dbh ) ) {
		$this->result = mysql_query( $query, $this->dbh );
	}
	$this->num_queries++;

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