Skip to content

Instantly share code, notes, and snippets.

@tonydjukic
Last active January 12, 2017 21:23
Show Gist options
  • Save tonydjukic/0f19f53e3b83025150e8eedbc0bb6327 to your computer and use it in GitHub Desktop.
Save tonydjukic/0f19f53e3b83025150e8eedbc0bb6327 to your computer and use it in GitHub Desktop.
Search for queries in WP tables and concatenate a string onto them in one fell swoop.
UPDATE `xxx_postmeta` SET `meta_value` = CONCAT(meta_value,'string-to-add') WHERE `xxx_postmeta`.`meta_key` = 'meta-key-value' AND `meta_value` LIKE '%xxx%';
@tonydjukic
Copy link
Author

Obviously, adjust as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment