[wp-trac] [WordPress Trac] #23919: Allow Placement of wildcards in meta query like (meta.php WP_Meta_Query)
WordPress Trac
noreply at wordpress.org
Tue Apr 2 16:53:03 UTC 2013
#23919: Allow Placement of wildcards in meta query like (meta.php WP_Meta_Query)
-----------------------------+-----------------------------
Reporter: Will B | Type: feature request
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Database
Version: 3.5.1 | Severity: minor
Keywords: |
-----------------------------+-----------------------------
The LIKE comparison has '%' hardcoded before and after the value (meta.php
line 807)
`$meta_value = '%' . like_escape( $meta_value ) . '%';`
Being able to specify the placement of the wildcards would be helpful
(maybe starts with and end with kinda queries). before and after could be
the default.
`$meta_value = '%' . like_escape( $meta_value ) . '%'; // default`
`$meta_value = like_escape( $meta_value ) . '%'; // starts with`
`$meta_value = '%' . like_escape( $meta_value ); //ends with`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23919>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list