Builder::where_not_in( string $column, TECEventsCustom_TablesV1Modelsarray $not_in_values = array() )
Append a new “NOT IN()” clause to the builder of where clauses.
Contents
Parameters
- $column
-
(string) (Required) The name of the column to compare against.
- $not_in_values
-
(<span class="TECEventsCustom_TablesV1Modelsarray">TECEventsCustom_TablesV1Modelsarray) (Optional) The list of values used in the comparison.
Default value: array()
Return
($this)
Source
File: src/Events/Custom_Tables/V1/Models/Builder.php
public function where_not_in( $column, array $not_in_values = [] ) {
$result = $this->prepare_list_of_values( $column, $not_in_values );
if ( $this->invalid || empty( $result ) ) {
return $this;
}
if ( empty ( $result['placeholders'] ) || empty( $result['values'] ) ) {
return $this;
}
global $wpdb;
$placeholders = implode( ',', $result['placeholders'] );
$this->wheres[] = $wpdb->prepare( "(`{$column}` NOT IN ({$placeholders}))", $result['values'] );
return $this;
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |