File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -300,12 +300,13 @@ public function starting_with($where){
300
300
301
301
// Support for both utf8 and utf8mb4
302
302
global $ wpdb ;
303
- $ charset = $ wpdb ->get_col_charset ('wp_posts ' , 'post_title ' );
303
+ $ wp_posts_prefix = $ wpdb ->prefix . 'posts ' ;
304
+ $ charset = $ wpdb ->get_col_charset ($ wp_posts_prefix , 'post_title ' );
304
305
305
- $ where .= 'AND (wp_posts .post_title ' .
306
+ $ where .= 'AND ( ' . $ wp_posts_prefix . ' .post_title ' .
306
307
'COLLATE ' . strtoupper ($ charset ) . '_GENERAL_CI LIKE \'' . $ letters [0 ] . "%' " ;
307
308
for ($ i =1 ; $ i <sizeof ($ letters ); $ i ++) {
308
- $ where .= 'OR wp_posts .post_title ' .
309
+ $ where .= 'OR ' . $ wp_posts_prefix . ' .post_title ' .
309
310
'COLLATE ' . strtoupper ($ charset ) . '_GENERAL_CI LIKE \'' . $ letters [$ i ] . "%' " ;
310
311
}
311
312
$ where .=') ' ;
You can’t perform that action at this time.
0 commit comments