1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to soft delete all threads in someone forum?

Discussion in 'Troubleshooting and Problems' started by Sasa, May 10, 2013.

  1. Sasa

    Sasa Active Member

    Is there are possible with phpMyAdmin?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sasa likes this.
  3. Sasa

    Sasa Active Member

    Code:
    UPDATE xf_thread
    SET discussion_state = 'deleted'
    WHERE discussion_state = 'visible'
    AND user_id = 2;
     
    INSERT INTO xf_deletion_log (content_type, content_id, delete_date, delete_user_id, delete_username, delete_reason)
        SELECT 'thread', thread_id, UNIX_TIMESTAMP(), 1, 'admin', 'manually deleted via query'
        FROM xf_thread
        WHERE discussion_state = 'deleted'
        AND user_id = 2
    ON DUPLICATE KEY UPDATE
        content_id = VALUES(content_id);
    Do I have replace user_id =2 with node_id IN (3)?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    To match the node_id instead of the user_id, yes.
     

Share This Page