Changes between Initial Version and Version 3 of Ticket #56933
- Timestamp:
- 10/31/2022 03:02:52 PM (2 years ago)
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. 1 I'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. 3 2 4 In some cases, I prefer not to use WP_Querywhen displaying data. This is the code from the plugin:3 In some cases, I prefer not to use `WP_Query` when displaying data. This is the code from the plugin: 5 4 6 5 {{{#!php … … 23 22 24 23 And here is an example of the SQL: 24 {{{#!sql 25 25 (select wp_posts.ID, post_title, wp_mgmlp_folders.folder_id, pm.meta_value as attached_file, 'a' as item_type 26 26 from wp_posts … … 36 36 LEFT JOIN wp_users AS us ON (wp_posts.post_author = us.ID) 37 37 where 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 }}} 38 39 39 40 This use to work in versions before 6.1.