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

Deleting PM's

Discussion in 'XenForo Questions and Support' started by mrchasez, Oct 4, 2012.

  1. mrchasez

    mrchasez Active Member

    I own a rather large gaming community (25k registered in last 5 months).

    I currently have 920 Unread private messages. Is there anyway i can mass delete them?
    I am not good with phpmyadmin either.

    Thanks
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. mrchasez

    mrchasez Active Member

  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In phpmyadmin, select your database from the left column, then click the SQL tab on the top. Paste those queries and click Go.

    Backup first.
     
  5. vVv

    vVv Guest

    could you search each of those tables in phpMyadmin by username, delete only their stuff? hmm, well... I've deleted users accounts in the vB4, then imported the stuff into XF, now I have tons of PC's where those users aren't even on the board anymore.. Is there a way to prune PC's of "guests" or whatever?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I would have to see your data, but probably these queries with user_id = 0

    http://xenforo.com/community/threads/deleting-pm-spam-from-member.34411/#post-391245
     
    vVv likes this.
  7. vVv

    vVv Guest

    Thanks Jake :) Yeah, I think it would have to be user_id=0 since they're no longer even member on the forum. I had to run a similar database query when I used vB4. I'll try it once, couldn't hurt. Not like my board is really active anymore anyway lol.
     
  8. vVv

    vVv Guest

    Nah, oddly that didn't work.. The PC's are in my Inbox, showing as just ME as participant of the PC's. I'd probably have to run it.. removing with "0" participants. Basically pruning all of my own PC's with no/zero participants/replies.
     
  9. vVv

    vVv Guest

    This worked.. xD Removed all PC's with just me as PC participant, Private messages that I had with deleted/ users from vB4 after import to XF.

    Code:
    DELETE
    FROM xf_conversation_message
    WHERE conversation_id IN (
        SELECT conversation_id
        FROM xf_conversation_master
        WHERE user_id = 0
    );
     
    DELETE
    FROM xf_conversation_recipient
    WHERE conversation_id IN (
        SELECT conversation_id
        FROM xf_conversation_master
        WHERE user_id = 0
    );
     
    DELETE
    FROM xf_conversation_user
    WHERE conversation_id IN (
        SELECT conversation_id
        FROM xf_conversation_master
        WHERE user_id = 0
    );
     
    DELETE
    FROM xf_conversation_master
    WHERE user_id = 1;
     

Share This Page