Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #56933


Ignore:
Timestamp:
10/31/2022 03:02:52 PM (2 years ago)
Author:
hellofromTonya
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56933 – Description

    initial v3  
    1 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
    2 like '%'my search text'%'. There is an extra set of quote marks around the search text.
     1I'm experiencing a similar issue and have just tested a like query with WP 6.1-RC5. The result is an SQL error and the output from the prepare function is like `'%'my search text'%'`. Notice, there is an extra set of quote marks around the search text.
    32
    4 In some cases, I prefer not to use WP_Query when displaying data. This is the code from the plugin:
     3In some cases, I prefer not to use `WP_Query` when displaying data. This is the code from the plugin:
    54
    65{{{#!php
     
    2322
    2423And here is an example of the SQL:
     24{{{#!sql
    2525(select wp_posts.ID, post_title, wp_mgmlp_folders.folder_id, pm.meta_value as attached_file, 'a' as item_type
    2626from wp_posts
     
    3636LEFT JOIN wp_users AS us ON (wp_posts.post_author = us.ID)
    3737where post_type = 'attachment' and pm.meta_key = '_wp_attached_file' and SUBSTRING_INDEX(pm.meta_value, '/', -1) like '{48bf6209debff2ee81208ffaee83c0ccfe32af6953d915a72a2fd46f1d0be2e1}'my search text'{48bf6209debff2ee81208ffaee83c0ccfe32af6953d915a72a2fd46f1d0be2e1}') order by attached_file
     38}}}
    3839
    3940This use to work in versions before 6.1.