Created
October 29, 2018 10:39
-
-
Save uptimizt/bf77160a0f956d2b39b775ae898f91d3 to your computer and use it in GitHub Desktop.
WordPress & SQL - delete commentmeta without comments
This file contains 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
DELETE cm | |
FROM wp_commentmeta as cm | |
LEFT JOIN wp_comments as c ON c.comment_ID = cm.comment_id | |
WHERE c.comment_ID is null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment