vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Mark all PM's read for single user (https://vborg.vbsupport.ru/showthread.php?t=266572)

MagicPID 07-10-2011 11:53 AM

Mark all PM's read for single user
 
I recently used ImpEx to transfer a MyBB forum to vBulletin. I had approximately 3,500 PM's in my inbox which for the time being I do NOT want to delete or remove. However, vBulletin has marked all of these as unread. What is the easiest way to to mark all of my PM's as read?

Thanks for your suggestions!

Disasterpiece 07-10-2011 12:16 PM

you need to run 2 sql queries.

This sets new pm count for every user to 0:
Code:

UPDATE vb4_user SET pmunread = 0
To mark the pms as unread as well inside the mailbox, use this query:
Code:

UPDATE vb4_pm SET messageread = 1
If you want to run it only for a single user, the queries are as follows:


This sets new pm count for the user with id 42 to 0:
Code:

UPDATE vb4_user SET pmunread = 0 WHERE userid = 42
To mark the pms belonging to user #42 as unread inside the mailbox, use this query:
Code:

UPDATE vb4_pm SET messageread = 1 WHERE userid = 42
Substitute vb4_ for the table prefix you're using and 42 for the userid you want to run the queries for.
It's safer to test these in a safe environment first, I suggest to copy the table before trying to run those queries.

MagicPID 07-10-2011 12:31 PM

Disasterpiece,

Thanks a ton for that! It worked perfectly. Much appreciated.


All times are GMT. The time now is 11:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01010 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete