W3cubDocs

/WordPress

wpdb::_do_query( string $query )

Internal function to perform the mysqli_query() call.

Description

See also

Parameters

$querystringrequired
The query to run.

Source

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()
		);
	}
}

Changelog

Version Description
3.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/_do_query