Announcement

Collapse
No announcement yet.

SQL to lock all threads over 2 years old

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dethfire
    replied
    Thanks Lats, worked like a charm!!

    Leave a comment:


  • Lats
    replied
    Try this...
    Code:
    UPDATE 
     thread
    SET 
     open = 0
    WHERE 
     open = 1
    AND 
     lastpost < unix_timestamp() - 63072000
    The big number is seconds in 2 years

    Leave a comment:


  • Andy
    replied
    Another way of doing it would be to create a plugin that disallows a new post after two years.

    Leave a comment:


  • dethfire
    started a topic SQL to lock all threads over 2 years old

    SQL to lock all threads over 2 years old

    What would the SQL statement be if I wanted to lock all threads over two years old? thanks!
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X