Announcement

Collapse
No announcement yet.

MySQL Query: Online total users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    Alfa1
    Senior Member

  • Alfa1
    replied
    Please delete. I will post my question in the 3.8 forum.

    Leave a comment:

  • Jake Bunce
    Senior Member

  • Jake Bunce
    replied
    I don't know of any updated version of that thread.

    Leave a comment:


  • jca
    replied
    Ah, that seems to have worked. Thank you so much for your help.

    By the way, is there an updated thread for Run This Query To: version 3.7.x since I was looking at an old query in the 3.0.x thread that no longer applied (in this case)?

    Leave a comment:

  • Jake Bunce
    Senior Member

  • Jake Bunce
    replied
    I think I see the problem. The line wrapper on this forum is inserting a space in the second line of the query, right in the middle of the serialized data. Using the CODE tag prevents this. Try copying and pasting this query:

    Code:
    UPDATE datastore
    SET data = 'a:2:{s:9:\"maxonline\";i:540;s:13:\"maxonlinedate\";i:1210841460;}'
    WHERE title = 'maxloggedin';

    Leave a comment:


  • jca
    replied
    Checked for any conflicts or suspect files. Don't appear to be any.

    Is this something I could try editing directly via phpMyAdmin rather than the vB query window?

    I can see the field by browsing through the table structure > datastore > maxloggedin.

    Leave a comment:

  • Jake Bunce
    Senior Member

  • Jake Bunce
    replied
    There are no associated counters. This works on my test forum. I don't know what the problem could be. Maybe it's a problem with a customization. Try disabling your plugins:

    Admin CP -> vBulletin Options -> Plugin/Hook System

    Also run a file check to look for customized files. Upload the original files if any problems are reported:

    Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

    Leave a comment:


  • jca
    replied
    Thanks for the help. Tried the new query you mentioned, but got the same result.

    1 row affected message. Did not affect the Most Online and it reset to current active users as the most online just as before.

    Do I need to run a specific "Update Counter" after this query?

    Leave a comment:

  • Jake Bunce
    Senior Member

  • Jake Bunce
    replied
    It is slightly different in the latest version. Try this:

    UPDATE datastore
    SET data = 'a:2:{s:9:\"maxonline\";i:540;s:13:\"maxonlinedate\";i:1210841460;}'
    WHERE title = 'maxloggedin';

    Leave a comment:


  • jca
    started a topic MySQL Query: Online total users

    MySQL Query: Online total users

    I'm trying to set Online total users to any X amount at certain date via a MySQL query as described here:

    http://www.vbulletin.com/forum/showp...37&postcount=2

    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:\"X\";s:13:\"maxonlinedate\";s10::\"date\";}' WHERE title = 'maxloggedin';
    We ran this query (with our 512 total users and May 15 2008, 08:51 PM date):

    Code:
    UPDATE datastore SET data = 'a:2:{s:9:\"maxonline\";s:2:\"540\";s:13:\"maxonlinedate\";s10::\"1210841460\";}' WHERE title = 'maxloggedin';
    And got a 1 row affected result message. However, the forum doesn't show the new setting and simply resets to whatever the current total users as the most users online. We tried running various Update Counters after the query. What are we missing?

    What Update Counters (if any) should we run after this MySQL query?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X