How to reset Most users ever online?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stevo
    New Member
    • Oct 2007
    • 22
    • 3.6.x

    How to reset Most users ever online?

    Most users ever online was 741, 27 August 2007 at 06:01 AM
    Is there some easy way to reset this without resetting anything else and keeping everything else the way it is?

    Sorry, but I can't see this fairly rudimentary question having been asked before.
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    To reset the max users online values, see this thread:



    You can use this online tool to convert dates and times to Unix Timestamps:



    Just remember to enter in the GMT values for the date and not the date and time in your specific timezone.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • Kirkus
      Senior Member
      • Mar 2007
      • 192
      • 3.6.x

      #3
      The query in the link posted above indicates "UPDATE datastore SET data = 'a:2:", however, looking at the datastore in my database, the related information starts with "UPDATE datastore SET data = 'a:4:". Does this matter? Is it possible to reset it to zero?

      Comment

      • Stevo
        New Member
        • Oct 2007
        • 22
        • 3.6.x

        #4
        Maybe I didn't make myself clear:

        All I want to do is reset to zero or some small number the maximum numbers of users ever online.

        In the example above it is 741. This is the number I want to reset because I don't think it reflects a fair number having regard to the timeout of users that I now apply to the forum.

        A clear instructive answer would be appreciated, thank you.

        Comment

        • dobbs
          New Member
          • Feb 2005
          • 29
          • 3.0.6

          #5
          Run this, it will reset to 1 user on the 1st of January 2009

          PHP Code:
          UPDATE datastore SET data 'a:2:{s:9:\"maxonline\";s:1:\"1\";s:13:\"maxonlinedate\";s:10:\"1230811200\";}' WHERE title 'maxloggedin' 
          It will immediately update to the number of users on your forum right this minute and display that as your most ever online.
          I just did it 5 minutes ago and it worked on my forum.

          Do you know how to run a query on your database?

          Comment

          • Kirkus
            Senior Member
            • Mar 2007
            • 192
            • 3.6.x

            #6
            Perfect! Worked like a charm. Thank you, dobbs.

            Comment

            • glennybee
              Senior Member
              • Feb 2008
              • 1005
              • 3.7.x

              #7
              I wanted to do this a while ago, this is the query I ran.

              Code:
              UPDATE datastore SET data = '' WHERE title = 'maxloggedin'

              Comment

              • Stevo
                New Member
                • Oct 2007
                • 22
                • 3.6.x

                #8
                Originally posted by dobbs

                Do you know how to run a query on your database?
                Hi, thank you very much for your assistance.

                I do not know how to 'run a query' on my database or exactly what that expression means. I can use terminal, I can get onto the server. Do I then need to somehow log into the database?

                Does the forum need to be turned off in vB control panel?

                Thank you.

                Comment

                • slappy
                  Senior Member
                  • Apr 2003
                  • 1206

                  #9
                  First, you need to be identified in the config.php file as a usernumber which has authority to execute queries. Assuming you set up the Forum, you would be userid #1.

                  You will find this in the config.php file in the section labled:

                  ****** USERS WITH QUERY RUNNING PERMISSIONS ******

                  If your userid is not in there, you will need to download the config.pho file and edit the config.php file to add your usernumber in this section. If you don't know your userid number, you can go to any post you have made in the forum, put your cursor on your username and "right-click" on the username and select "properties" from the menu and it will show your usernumber (membernumber) on the end of the link shown in the properties.

                  Assuming your userid in in the config.php file as authorized to run queries, you would go to:

                  AdminCP --> Maintenance --> Execute SQL Query --> click it and enter the query in the box which will open.

                  In this case it would be:

                  Code:

                  UPDATE datastore SET data = '' WHERE title = 'maxloggedin'

                  I do not believe you need to turn the Forum off, but it can't hurt to do it anyway.

                  Regards
                  Slappy

                  Comment

                  • Stevo
                    New Member
                    • Oct 2007
                    • 22
                    • 3.6.x

                    #10
                    Thanks guys, yes that wasn't too difficult and it re-set basically instantly.

                    It is important to note that in executing the command there are two ' (single quotation marks) and not one " (double quotation mark) in the command data = '' WHERE title section of the command.

                    Comment

                    • slappy
                      Senior Member
                      • Apr 2003
                      • 1206

                      #11
                      I was aware of that.

                      What you see is just a result of the "copy-paste" of the query from the provious post, which made it look like a double quote mark.

                      Glad you got it working.

                      Regards,
                      Slappy

                      Comment

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