Make WordPress Core

Opened 14 years ago

Closed 13 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:
Priority: normal Milestone:
Component: Query Version: 3.5.1
Severity: minor Keywords:
Cc: Focuses:

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)

#1 @SergeyBiryukov
13 years ago

  • Component Database → Query
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed
  • Type feature request → enhancement

Duplicate of #19738.

Note: See TracTickets for help on using tickets.