Announcement

Collapse
No announcement yet.

Clearing PMs

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

  • [Forum] Clearing PMs

    Hi,

    Is there a command I can use to remove all user PMs? (clear them down?)

    thanks

  • #2
    Originally posted by MonsterDK View Post
    Hi,

    Is there a command I can use to remove all user PMs? (clear them down?)

    thanks
    Have a look at my post here:

    https://www.vbulletin.com/forum/show...=1#post2308120

    Do only the part for the pm's.

    Comment


    • #3
      Hi thanks for your reply...


      When you said...

      To delete the private messages truncate the following tables: pm, pmreceipt, pmtext and pmthrottle.
      Is there something I need to do then before the SQL query?
      UPDATE vb_user pmtotal = 0, pmunread= 0;

      Comment


      • #4
        Yes, you must truncate the pm tables first then run that query.

        Comment


        • #5
          Originally posted by borbole View Post
          Yes, you must truncate the pm tables first then run that query.

          This is something I've not done before.
          Could you please be more specific ?

          I'd be using phpmyadmin
          thanks

          Comment


          • #6
            Code:
            TRUNCATE TABLE pm;
            TRUNCATE TABLE pmreceipt;
            TRUNCATE TABLE pmtext;
            TRUNCATE TABLE pmthrottle;

            Comment


            • #7
              Hi,

              I've tried this...

              UPDATE vb_user SET pmtotal = 0, pmunread= 0;
              I thought this would update the PM status for all users after I used TRUNCATE.
              But using the above QUOTED text. I get this..

              Table 'nzbshare_testvb.vb_user' doesn't exist

              What did I do wrong?

              thanks

              Comment


              • #8
                The correct query for those that don't have a prefix is:

                UPDATE user SET pmtotal = 0, pmunread= 0;

                Comment


                • #9
                  Originally posted by MonsterDK View Post
                  Hi,

                  I've tried this...



                  I thought this would update the PM status for all users after I used TRUNCATE.
                  But using the above QUOTED text. I get this..

                  Table 'nzbshare_testvb.vb_user' doesn't exist

                  What did I do wrong?

                  thanks

                  It means that you either use a different prefix for your db tables or you are not using one at all. If the former, replace vb_ with whatever prefix you are using. If the later omit the vb_ from the query and run it like Andy posted above.

                  Comment


                  • #10
                    thanks. got it working

                    Comment


                    • #11
                      Originally posted by MonsterDK View Post
                      thanks. got it working

                      Glad to hear that you got it working

                      Comment

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