Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /*
  2. * replace these values
  3. * <wp table prefix>
  4. * <search value>
  5. * <replace value>
  6. */
  7.  
  8. UPDATE `<wp table prefix>_postmeta`
  9. LEFT JOIN <wp table prefix>_posts ON <wp table prefix>_postmeta.post_id = <wp table prefix>_posts.ID
  10. SET
  11. /* we use meta_value cause that is where the acf saves its data */
  12. <wp table prefix>_postmeta.meta_value = REPLACE(<wp table prefix>_postmeta.meta_value, "<search value>", "<replace value>")
  13. WHERE
  14. /*
  15. * be careful with the matching % is a wildcard, and in this case it would match
  16. * anything before the search value and anything after
  17. * make sure that is what you want
  18. */
  19. <wp table prefix>_postmeta.meta_value LIKE "%<search value>%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement