get_meta_sql

SummerySummery

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

Syntax

get_meta_sql( array $meta_query, string $type, string $primary_table, string $primary_id_column, object $context = null )

ParametersParameters

$meta_query

(array) (Required) A meta query.

$type

(string) (Required) Type of meta.

$primary_table

(string) (Required) Primary database table name.

$primary_id_column

(string) (Required) Primary ID column name.

$context

(object) (Optional) The main query object

Default value: null

ReturnReturn

(array) Associative array of JOIN and WHERE SQL.

SourceSource

File: wp-includes/meta.php


			

ChangelogChangelog

Changelog
Version Description
3.2.0 Introduced.

See alsoSee also

Scroll to Top