Builder::where_raw( string $query, mixed $args )
Adds a raw WHERE clause to the SQL statement being built.
Contents
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.
Return
($this) A reference to the query builder object, for chaining purposes.
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;
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |