Announcement

Collapse
No announcement yet.

Run Query to Reset Count to *

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run Query to Reset Count to *

    FAQ: What you need to know about running queries

    Create at least two working database backups before attemping to Executing Queries.
    • Backing-up your MySQL Database Manually
    • Upload and place your vBulletin version behind .htaccess and play with it, test hacks and add your template modification.
    • Test all your Catagories, Forums, Threads, Posts, User Cp, Adminastrative / Moderator board functions.
    • List all your hacks on a piece of paper, then visit www.vbulletin.org and find those edit and make sure they are working.



    Backup tools if you do not have SHH access from your host.

    What is .htacces

    Use the Update Counters if ask to after Execute SQL Query is completed.


    So please ask lots and lot of question before executing these queries on your forum's database.

    Queries posted here are from members, vBulletin.com and vBulletin.org Staff that posted in these forums and are not to be taken likely, as these can have irreversible affects to your forums database.


    vBulletn version 3.5Updating Options En Masse with Queries
    vBulletn version 3.6Updating Options En Masse with Queries
    Last edited by Jose Amaral Rego; Sat 1 Mar '08, 8:31am.

  • #2
    Run Query to Reset Count to *

    These have only been tested on vbulletin version 3.6.5 non-live forum. No, adverse effects has shown as on yet.

    Run Query to Reset Count to *
    Members private message unread of user(s) / usergroup to X amount for all or selected user / usergroup identification number
    # replace vbb_ with your vB table prefix Example: [vbb_user] if non leave blank
    # replace X with new total
    # replace X with the new user / usergroup id
    Code:
    UPDATE user SET pmunread = '[COLOR="red"]X[/COLOR]'
    UPDATE user SET pmunread = '[COLOR="red"]X[/COLOR]' WHERE userid = '[COLOR="blue"]X[/COLOR]';
    UPDATE user SET pmunread = '[COLOR="red"]X[/COLOR]' WHERE usergroupid = '[COLOR="Blue"]X[/COLOR]';
    Run Query to Reset Count to *
    Online total users to any X amount
    # replace vbb_ with your vB table prefix Example: [vbb_datastore] if non leave blank
    # replace X with new total
    Code:
    UPDATE datastore SET data = '[COLOR="Red"]X[/COLOR]' WHERE title = 'maxloggedin';
    Run Query to Reset Count to *
    Online total users to any X amount at certain date
    # replace vbb_ with your vB table prefix Example: [vbb_datastore] if non leave blank
    # replace X with new total
    # replace date with Unix timestamp Example: 1167991932 = 01-05-2007 10:12:12
    Code:
    UPDATE datastore SET data = 'a:2:{s:9:\"maxonline\";s:2:\"[COLOR="red"]X[/COLOR]\";s:13:\"maxonlinedate\";s10::\"[COLOR="blue"]date[/COLOR]\";}' WHERE title = 'maxloggedin';
    http://www.onlineconversion.com/unix_time.htm
    http://www.4webhelp.net/us/timestamp.php

    Run Query to Reset Count to *
    Members reputation to X amount
    # replace vbb_ with your vB table prefix Example: [vbb_user] if non leave blank
    # replace X with new total
    Code:
    UPDATE user SET reputation ='[COLOR="Red"]X[/COLOR]';
    Run Query to Reset Count to *
    Members reputation of usergroup to X amount for selected usergroup identification number
    # replace vbb_ with your vB table prefix Example: [vbb_user] if non leave blank
    # replace X with new total
    # replace X with the new usergroup id
    Code:
    UPDATE user SET reputation = '[COLOR="red"]X[/COLOR]' WHERE usergroupid = '[COLOR="blue"]X[/COLOR]';
    Run Query to Reset Count to *
    Forum thread count to X amount for selected forum identification number
    # replace vbb_ with your vB table prefix Example: [vbb_forum] if non leave blank
    # replace X with new total
    # replace X with the forum id(s)
    Code:
    UPDATE forum SET threadcount = '[COLOR="red"]X[/COLOR]' WHERE forumid = '[COLOR="blue"]X[/COLOR]'
    Run Query to Reset Count to *
    Forum post replycount to X amount for selected forum identification number
    # replace vbb_ with your vB table prefix Example: [vbb_forum] if non leave blank
    # replace X with new total
    # replace X with the new forum id
    Code:
    UPDATE forum SET replycount = '[COLOR="Red"]X[/COLOR]' WHERE forumid = '[COLOR="Blue"]X[/COLOR]';
    Run Query to Reset Count to *
    Thread views to X amount for selected thread identification number
    # replace vbb_ with your vB table prefix Example: [vbb_thread] if non leave blank
    # replace X with new total
    # replace X with the new thread id
    Code:
    UPDATE thread SET views = '[COLOR="red"]X[/COLOR]' WHERE threadid = '[COLOR="blue"]X[/COLOR]';
    Admin CP -> Import & Maintenance -> Update Counters -> Rebuild Thread Information

    Run Query to Reset Count to *
    All Thread views to X amount
    # replace vbb_ with your vB table prefix Example: [vbb_thread] if non leave blank
    # replace X with new total
    Code:
    UPDATE thread SET views = '[COLOR="red"]X[/COLOR]';
    Admin CP -> Import & Maintenance -> Update Counters -> Rebuild Thread Information
    Last edited by Jose Amaral Rego; Tue 15 May '07, 9:25pm. Reason: Formating post

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X