vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=313784

How Post Count is Calculated
by tsptom
18 Aug 2014 19:22

I have a question about how post counts are determined. I have one member who has 5042 posts, according to the database using this query:

SELECT count(*)
FROM post
WHERE username = 'xxx'

But that gets 42 more rows than what the post count in the forum is, which says 5000 even.

The "visible" field has 5039 1's and 3 2's, if that means anything.

What would cause the difference?

Thanks.

Lynne 18 Aug 2014 19:57

Do any of your forums have "Count Posts Made in this Forum Towards User Post Counts" set to No?

tsptom 18 Aug 2014 20:14

Interesting. Is there a way to check that in the database, as opposed to checking the individual forum settings?

--------------- Added 18 Aug 2014 at 20:23 ---------------

I'm not seeing any of the obvious forums set that way, like private forums and threads.

Could it have anything to do with deleted forums or threads? How about soft deleted posts?

ozzy47 18 Aug 2014 20:27

Its possible it could be due to soft deleted posts, or posts that are in moderation.

tsptom 18 Aug 2014 20:33

Thanks. Do you know how to eliminate soft deleted posts from this select statement?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


ozzy47 18 Aug 2014 20:44

Try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


tsptom 18 Aug 2014 21:05

Adding visible took it down to the 5039. (there were three 2's in the visible column).

I think I will just have to go with the "posts" column in the user table. It matches the current forum's post count, but not what I count using the select. I was just curious why they didn't match.

Thank you!


All times are GMT. The time now is 01:11.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.