Announcement

Collapse
No announcement yet.

SQL to lock all threads over 2 years old

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

  • 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!
    http://www.physicsforums.com

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

    Comment


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

      Comment


      • #4
        Thanks Lats, worked like a charm!!
        http://www.physicsforums.com

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X