Builder::where_raw( string $query, mixed $args )

Adds a raw WHERE clause to the SQL statement being built.


Parameters

$query

(string) (Required) The SQL clause to be prepared using the wpdb::prepare() method and placeholder format.

$args

(mixed) (Required) A set of arguments that should be used to prepare the SQL statement.


Top ↑

Return

($this) A reference to the query builder object, for chaining purposes.


Top ↑

Source

File: src/Events/Custom_Tables/V1/Models/Builder.php

	public function where_raw( $query, ...$args ) {
		global $wpdb;
		$this->wheres[] = '(' . $wpdb->prepare( $query, ...$args ) . ')';

		return $this;
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.