Log in

View Full Version : Mass close treads


bki
06-25-2004, 07:30 AM
older than 30 days..... is this possible?

I can only find a hack for v2 :ermm:

dutchbb
08-03-2004, 03:20 PM
I want this too!! Per forum would be good!!

Andreas
08-03-2004, 03:27 PM
"older than 30 days." - based on thread creation date or last post?

For last post:
UPDATE thread SET open=0 WHERE lastpost < UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -30 DAY)) AND forumid IN (10,11,12)

For thread creation date:
UPDATE thread SET open=0 WHERE dateline < UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -30 DAY)) AND forumid IN (10,11,12)

(10,11,12 are just examples for the forum ids)