GC_Date_Query::get_sql_clauses()
最后更新于:2021-11-27 13:23:05
GC_Date_Query::get_sql_clauses()Generate SQL clauses to be appended to a main query.
响应
(array) Array containing JOIN and WHERE SQL clauses to append to the main query.
-
‘join’
(string) SQL fragment to append to the main JOIN clause. -
‘where’
(string) SQL fragment to append to the main WHERE clause.
源文件
文件: gc-includes/class-gc-date-query.php
protected function get_sql_clauses() {
$sql = $this->get_sql_for_query( $this->queries );
if ( ! empty( $sql['where'] ) ) {
$sql['where'] = ' AND ' . $sql['where'];
}
return $sql;
}