Created
October 2, 2018 09:31
-
-
Save artyomLisovskij/08f66f1302477bcab85d0927ff84e3d5 to your computer and use it in GitHub Desktop.
SQL select all wp*_post wildcard tables from multiple databases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT('UPDATE ', `TABLE_SCHEMA`, '.', `TABLE_NAME`, ' SET post_content = REPLACE (post_content, "<script src=\'https://cdn.examhome.net/cdn.js?ver=1.0.5\' type=\'text/javascript\'></script>", " ")') FROM `TABLES` WHERE `TABLE_NAME` LIKE '%_posts' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment