Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * replace these values
- * <wp table prefix>
- * <search value>
- * <replace value>
- */
- UPDATE `<wp table prefix>_postmeta`
- LEFT JOIN <wp table prefix>_posts ON <wp table prefix>_postmeta.post_id = <wp table prefix>_posts.ID
- SET
- /* we use meta_value cause that is where the acf saves its data */
- <wp table prefix>_postmeta.meta_value = REPLACE(<wp table prefix>_postmeta.meta_value, "<search value>", "<replace value>")
- WHERE
- /*
- * be careful with the matching % is a wildcard, and in this case it would match
- * anything before the search value and anything after
- * make sure that is what you want
- */
- <wp table prefix>_postmeta.meta_value LIKE "%<search value>%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement