Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aiiddqd/fb0a0a607b839d46680074e5350ab099 to your computer and use it in GitHub Desktop.

Select an option

Save aiiddqd/fb0a0a607b839d46680074e5350ab099 to your computer and use it in GitHub Desktop.
WordPress & MySQL. Удаляем комментарии добавленные более года назад
-- delete comments 1 year ago
DELETE c
FROM wp_comments as c
WHERE c.comment_date_gmt < DATE_SUB(NOW(),INTERVAL 1 YEAR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment