Builder::where_in( string $column, TECEventsCustom_TablesV1Modelsarray $in_values = array() )

Get an array of models that match with the criteria provided.


Parameters

$column

(string) (Required) The column name to look for.

$in_values

(<span class="TECEventsCustom_TablesV1Modelsarray">TECEventsCustom_TablesV1Modelsarray) (Optional) An array of values to test against the database.

Default value: array()


Top ↑

Return

(TECEventsCustom_TablesV1ModelsBuilder)


Top ↑

Source

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

	public function where_in( $column, array $in_values = [] ) {
		$result = $this->prepare_list_of_values( $column, $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}` IN ({$placeholders}))", $result['values'] );

		return $this;
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.