The past few weeks there has been a boost in comment spamming in my blog. Quite annoying when I have to delete 5 to 10 spam comments each day. So I decided to disable comments on old posts, but it was not as straight forward as I wanted. It is possible to disable pr. post, but with 10 years of blogging doing it manually is no option. But luckily I found this SQL statement
UPDATE evo_items__item SE T post_comment_status = "closed" WHERE NOW() > DATE_ADD(post_datecreated, INTERVAL 10 DAY)
Solution found on the B2Evolution forum. Must admit that even though it is a one liner, it goes way above my head 🙂