MyBB Community Forums

Full Version: Amount of PMs wrong
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have two users at the moment saying that there inbox says they have a certain amount of PMs but they have deleted everything.

This install is a merge of a VB database.

I don't have any mods other than the Theme.


The users aren't sure if it's been like this since we did the merge or not.


http://www.texasradiocontrol.com/forum/


Thanks for any help.
Go to AdminCp > Tools & Maintenance > Recount & Rebuild and try to rebuild all stats.
I ran all the rebuild and recount options and nothing.

I just checked and deleted all my PM's and it's showing I still have 22 PM's even though I emptied all folders including the trashcan.
Run this SQL code in PHPMyAdmin or something:
UPDATE mybb_users u SET u.totalpms = (SELECT COUNT(pmid) FROM mybb_privatemessages WHERE toid=u.uid);

This will recount the total private messages for every user. Make sure you change the table prefix if you have something else than "mybb_".
(2010-11-02, 04:36 PM)Aries-Belgium Wrote: [ -> ]Run this SQL code in PHPMyAdmin or something:
UPDATE mybb_users u SET u.totalpms = (SELECT COUNT(pmid) FROM mybb_privatemessages WHERE toid=u.uid);

This will recount the total private messages for every user. Make sure you change the table prefix if you have something else than "mybb_".


I get error after error:

First error was the Mybb, guess I don't have any prefixes from VB. Fixed

Second: users does not exsist, changed to user.

Third: privatemessages does not exsist, changed to PM (not sure if thats correct)



and this is where I stopped:

#1054 - Unknown column 'u.totalpms' in 'field list'




Just tried:

UPDATE user u SET u.pmtotal = (SELECT COUNT(pmid) FROM pm WHERE toid=u.uid)

and got :

#1054 - Unknown column 'toid' in 'where clause'




Hmm, if you convert the MyBB tables should be populated with the data from VB so there shouldn't be a difference between my database layout and yours (except the prefixing of course). Make sure the prefix is correct. Look in inc/config.php and search for $config['database']['database'].
If they've deleted everything, have they also deleted it from the trash??

(2010-11-02, 07:22 PM)Ripper7777777 Wrote: [ -> ]First error was the Mybb, guess I don't have any prefixes from VB. Fixed

Second: users does not exsist, changed to user.

Third: privatemessages does not exsist, changed to PM (not sure if thats correct)

This isn't right.

The prefix on the MyBB tables has nothing to do whatsoever with the vB forum, the tables will have whatever prefix you set when you installed MyBB, which'll be mybb_ unless you changed it.

Users does exist, user isn't what it's called in MyBB, it's called users.

If privatemessages, or indeed users, didn't exist, you'd be getting SQL errors on every single page, the forum wouldn't be working. It looks like you're looking at the wrong database here.
LOL! Sorry about all that, in my defense my 9 month old hasn't been letting me sleep for days now.

I ran it and got this...

28 row(s) affected. ( Query took 0.2274 sec )
UPDATE mybb_users u SET u.totalpms = ( SELECT COUNT( pmid )
FROM mybb_privatemessages
WHERE toid = u.uid ) ;



Now it says I have 32 pms, but if you go to empty folders it shows all folders at 0



Ok I just selected all 4 folders and deleted and now I'm back at 22


Ran it again just to try and now I'm at 32 again, I'm tired and confused.
(2010-11-02, 09:53 PM)Ripper7777777 Wrote: [ -> ]LOL! Sorry about all that, in my defense my 9 month old hasn't been letting me sleep for days now.

I suppose that's a valid excuse Toungue

Do any PMs show when you view the PM folders themselves?? If not, try sending yourself a PM and deleting it; the PM count will also be recounted periodically automatically too.
No PM's after I empty folders, but no matter what I do it never resets to zero. I even tried changing it in manually in PHPmyadmin, still stays at 22 for me. Is there anywhere else that this would be recorded.
Pages: 1 2