WP_Date_Query::get_sql_for_query

SummerySummery

Generate SQL clauses for a single query array.

Syntax

WP_Date_Query::get_sql_for_query( array $query, int $depth )

DescriptionDescription

If nested subqueries are found, this method recurses the tree to produce the properly nested SQL.

ParametersParameters

$query

(array) (Required) Query to parse.

$depth

(int) (Optional) Number of tree levels deep we currently are. Used to calculate indentation. Default 0.

ReturnReturn

(array) Array containing JOIN and WHERE SQL clauses to append to a single query array.

  • 'join'
    (string) SQL fragment to append to the main JOIN clause.
  • 'where'
    (string) SQL fragment to append to the main WHERE clause.

SourceSource

File: wp-includes/class-wp-date-query.php


			

ChangelogChangelog

Changelog
Version Description
4.1.0 Introduced.
Scroll to Top