On this page
WP_Date_Query::get_sql_for_subquery( array $query ): string[]
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
$queryarray Required-
Date query arguments.
Return
string[] Array containing JOIN and WHERE SQL clauses to append to the main query.
joinstringSQL fragment to append to the main JOIN clause.wherestringSQL fragment to append to the main WHERE clause.
Source
File: wp-includes/class-wp-date-query.php. View all references
protected function get_sql_for_subquery( $query ) {
return $this->get_sql_for_clause( $query, '' );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Date_Query::get_sql_for_clause() wp-includes/class-wp-date-query.php | Turns a first-order date query into SQL for a WHERE clause. |
Changelog
| Version | Description |
|---|---|
| 3.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_date_query/get_sql_for_subquery