[wp-trac] [WordPress Trac] #27344: Array support in WP_Meta_Query when compare operator is LIKE or NOT LIKE

WordPress Trac noreply at wordpress.org
Tue Apr 22 21:15:51 UTC 2014


#27344: Array support in WP_Meta_Query when compare operator is LIKE or NOT LIKE
-------------------------------------------------+-------------------------
 Reporter:  digitty                              |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  normal                               |     Version:  3.8
 Keywords:  meta-query has-patch needs-refresh   |  Resolution:
  needs-unit-tests                               |     Focuses:
-------------------------------------------------+-------------------------
Changes (by wonderboymusic):

 * keywords:  meta-query has-patch => meta-query has-patch needs-refresh
     needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Nice suggestion, digitty - it might be cleaner to have another property in
 the array for `relation` or `condition`:

 {{{
 array(
     'relation' => 'OR',
     'key'     => 'cf_company_name',
     'value'   => array( 'com', 'net' ),
     'compare' => 'LIKE',
     'type'    => 'CHAR',
 ),
 }}}

 Your idea would be a good way to short-circuit the need to add several
 related sets of `meta_query` conditions

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27344#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list