I love phpMyAdmin’s Bookmarked SQL queries.
I found this snippet of sql that closes comments on blog posts that are more than 14 days old somewhere, but couldn’t remember where. Luckily, I’d stored it as a bookmark on the SQL tab of the table interface.
And for reference, the code is below. Change the interval to suit.
UPDATE mt_entry SET entry_allow_comments = 2, entry_allow_pings = 0 WHERE entry_created_on < date_add(curdate(), interval -14 day)