Opened 12 years ago
Closed 12 years ago
#23919 closed enhancement (duplicate)
Allow Placement of wildcards in meta query like (meta.php WP_Meta_Query)
Reported by: | Will B | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.5.1 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
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
Change History (1)
Note: See
TracTickets for help on using
tickets.
Duplicate of #19738.