Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 28 Aug 2008, 21:25
tim330i tim330i is offline
 
Join Date: Apr 2002
How to Update Post Count for a Single User

It seems like there would be an easy way to do this. Anyone have any ideas?

Thanks in advance,
Tim
Reply With Quote
  #2  
Old 28 Aug 2008, 21:33
fattony69 fattony69 is offline
 
Join Date: Jun 2007
Real name: Tony
Edit the member. There is a place for post count.
Reply With Quote
  #3  
Old 28 Aug 2008, 21:41
tim330i tim330i is offline
 
Join Date: Apr 2002
Ok, but I need to know what the value should be.

Tim
Reply With Quote
  #4  
Old 28 Aug 2008, 21:59
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If you have phpMyAdmin, a real easy way would be to go into the post table and find all posts by that user. It then tells you in the query how many rows get returned. I think if you just want to make the query, it would be something like:


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

where x is the userid. (That does not take into account table prefixes. It's copied straight from phpMyAdmin - except I put count(*) in the select part of the statement.)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 28 Aug 2008, 22:05
tim330i tim330i is offline
 
Join Date: Apr 2002
Yes, but that doesn't take into account forums that posts don't increment the post counter. As far as I can tell that option is stored in an option bitfield, which I can't decypher in mysql.

Tim
Reply With Quote
  #6  
Old 28 Aug 2008, 22:12
Opserty Opserty is offline
 
Join Date: Apr 2007
AdminCP > Maintenance > Update Counters > Update Post Counts

READ MESSAGE GIVEN UNDER THE TITLE BEFORE YOU PROCEED
Reply With Quote
  #7  
Old 28 Aug 2008, 22:14
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by tim330i View Post
Yes, but that doesn't take into account forums that posts don't increment the post counter. As far as I can tell that option is stored in an option bitfield, which I can't decypher in mysql.

Tim
I guess you can modify the query to add something in the where statement: AND 'forumid' !=y
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 29 Aug 2008, 02:23
tim330i tim330i is offline
 
Join Date: Apr 2002
Originally Posted by Opserty View Post
AdminCP > Maintenance > Update Counters > Update Post Counts

READ MESSAGE GIVEN UNDER THE TITLE BEFORE YOU PROCEED
Yes, I read that. I don't want to do this for all members, just one. I don't see why this is so complicated.

Originally Posted by Lynne View Post
I guess you can modify the query to add something in the where statement: AND 'forumid' !=y
I guess I could do that, figure out all the IDs and use an NOT IN statement or something....I was hoping to have the SQL/code do all the work.

It seems like this shouldn't be this hard.

Tim
Reply With Quote
  #9  
Old 29 Aug 2008, 03:30
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Updating all users post counts is the best way. Should only take 1-2 minutes.
__________________
Excel Help! Searchable MS Office Help Forums
Reply With Quote
  #10  
Old 29 Aug 2008, 16:25
tim330i tim330i is offline
 
Join Date: Apr 2002
I have a feeling it is going to take a lot longer than a few min. And I have custom post counts for some users that I can't lose.

If I wanted to simply update all the users I would have just done it and not posted looking for a solution to what I thought was a simple request.

Tim
Reply With Quote
  #11  
Old 29 Aug 2008, 17:03
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Have you tried looking at the query in the admin cp for updating the post counts and thought of just substituting the userid for this one user? (The below code is from misc.php under do=updateposts and is for 3.6.8.)

First you have to get the forums (basically only get the forumids of those that allow post counts):

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

Then you update them. You need to put in the userid where it says $user[userid] and then the forums above where it says $gotforums. I mean, this is the actual query, but I would just do it as I said above.

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

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Release - MiniHack] Make update user info update post counts DarkReaper vBulletin 2.x Full Releases 5 19 Jan 2002 05:47



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 22:40.

Layout Options | Width: Wide Color: