Un motore di ricerca WordPress per sviluppatori e autori di temi



get_meta_sql ›

Da3.2.0
Deprecaton/a
get_meta_sql ( $meta_query, $type, $primary_table, $primary_id_column, $context = null )
Parametri: (5)
  • (array) $meta_query A meta query.
    Richiesto:
  • (string) $type Type of meta.
    Richiesto:
  • (string) $primary_table Primary database table name.
    Richiesto:
  • (string) $primary_id_column Primary ID column name.
    Richiesto:
  • (object) $context Optional. The main query object
    Richiesto: No
    Default: null
Vedi:
  • WP_Meta_Query
Ritorna:
  • (array) Associative array of `JOIN` and `WHERE` SQL.
Definito a:
Codex:

Given a meta query, generates SQL clauses to be appended to a main query.



Sorgenti

function get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) {
	$meta_query_obj = new WP_Meta_Query( $meta_query );
	return $meta_query_obj->get_sql( $type, $primary_table, $primary_id_column, $context );
}