[wp-trac] [WordPress Trac] #20312: Meta_query needs relation arg per key/value pair

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 28 10:45:47 UTC 2012


#20312: Meta_query needs relation arg per key/value pair
--------------------------+------------------------------
 Reporter:  CoenJacobs    |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.2
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------

Comment (by scribu):

 > where '_kind' is 'value_1' or 'value_2'

 You can use IN:

 {{{
 'meta_query' => array(
   array(
     'key' => '_kind',
     'value' => array( 'value_1', 'value_2' ),
     'compare' => 'IN'
   )
   ...
 )
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20312#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list