WP_Date_Query::get_sql_for_subquery( array $query ): array

Turns a single date clause into pieces for a WHERE clause.

Description

A wrapper for get_sql_for_clause(), included here for backward compatibility while retaining the naming convention across Query classes.

Parameters

$queryarrayrequired
Date query arguments.

Return

array Array containing JOIN and WHERE SQL clauses to append to the main query.
  • join string[]
    Array of SQL fragments to append to the main JOIN clause.
  • where string[]
    Array of SQL fragments to append to the main WHERE clause.

Source

protected function get_sql_for_subquery( $query ) {
	return $this->get_sql_for_clause( $query, '' );
}

Changelog

VersionDescription
3.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.