Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2008, 08:25 PM
tim330i tim330i is offline
 
Join Date: Apr 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 08-28-2008, 08:33 PM
fattony69 fattony69 is offline
 
Join Date: Jun 2007
Location: Philly
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit the member. There is a place for post count.
Reply With Quote
  #3  
Old 08-28-2008, 08:41 PM
tim330i tim330i is offline
 
Join Date: Apr 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, but I need to know what the value should be.

Tim
Reply With Quote
  #4  
Old 08-28-2008, 08:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
SELECT  count(*) 
FROM  `post` 
WHERE  `userid`  =x
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.)
Reply With Quote
  #5  
Old 08-28-2008, 09:05 PM
tim330i tim330i is offline
 
Join Date: Apr 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 08-28-2008, 09:12 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AdminCP > Maintenance > Update Counters > Update Post Counts

READ MESSAGE GIVEN UNDER THE TITLE BEFORE YOU PROCEED
Reply With Quote
  #7  
Old 08-28-2008, 09:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #8  
Old 08-29-2008, 01:23 AM
tim330i tim330i is offline
 
Join Date: Apr 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.

Quote:
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 08-29-2008, 02:30 AM
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Location: Australia
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updating all users post counts is the best way. Should only take 1-2 minutes.
Reply With Quote
  #10  
Old 08-29-2008, 03:25 PM
tim330i tim330i is offline
 
Join Date: Apr 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply


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

Forum Jump


All times are GMT. The time now is 08:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08645 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete