get_meta_sql
get_meta_sql ( $meta_query, $type, $primary_table, $primary_id_column, $context = null )
Parameters:- (array) meta_query A meta query.
- (string) type Type of meta.
- (string) primary_table Primary database table name.
- (string) primary_id_column Primary ID column name.
- (object) context Optional. The main query object. Default null.
See:Returns:- (string[]|false) { Array containing JOIN and WHERE SQL clauses to append to the main query, or false if no table exists for the requested meta type. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. }
Defined at: - Introduced in WordPress: 3.2.0
- Deprecated in WordPress: —
Description
Given a meta query, generates SQL clauses to be appended to a main query.