Prepare function removes percent signs from LIKE SQL statement
-
My plugin use a LIKE SQL statement and with RC3 the percent signs are removed from the SQL resulting in the query no longer working.
$wpdb->prepare(“select * from wp_posts where post_title LIKE ‘%%%s%%'”, “news”);
should result in “select * from wp_posts where post_title LIKE ‘%news%'”. Instead it outputs “select * from wp_posts where post_title LIKE ‘news'” and thus fails.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Prepare function removes percent signs from LIKE SQL statement’ is closed to new replies.