[wp-trac] [WordPress Trac] #56802: Query: Post IDs cached for search and other 'LIKE' queries are unreachable

WordPress Trac noreply at wordpress.org
Sun Oct 30 12:46:36 UTC 2022


#56802: Query: Post IDs cached for search and other 'LIKE' queries are unreachable
-------------------------------------------------+-------------------------
 Reporter:  dlh                                  |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  high                                 |   Milestone:  6.1
Component:  Query                                |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing fixed-major                            |  performance
-------------------------------------------------+-------------------------
Changes (by AlanP57):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm experiencing a similar issue and have just tested a like query with
 RC5. The result is an SQL error and the output from the prepare function
 is
 like '%'my search text'%'. There is an extra set of quote marks around the
 search text.

 For more info, see https://wordpress.org/support/topic/prepare-function-
 removes-percent-signs-from-like-sql-statement/.

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


More information about the wp-trac mailing list