If I try to use a prepare with a query like
post_id IN (50, 48, 46, 44, 42)
if I use a placeholder for number %d, it returns only the first one.
If I use the string placeholder, like %s, it doesn’t work also, because the query becomes
post_id IN ('50, 48, 46, 44, 42')
is there a solution for that? or do i have just to validate the IDs by myself and use not the placeholder?
- The topic ‘$wpdb->prepare with an sql like "WHERE id IN()"’ is closed to new replies.