Announcement

Collapse
No announcement yet.

Who's online database errors after Beta 4 upgrade

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

  • Who's online database errors after Beta 4 upgrade

    Hi. Beta 4 is looking pretty good! Just having one issue and I'm hoping someone can help me figure out how to fix it. It doesn't happen every time, so it's strange.

    I get this database error in Who's Online sometimes:

    Code:
    Database error in vBulletin 3.7.0 Beta 4:
    
    Invalid SQL:
    
                SELECT userid, username, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                FROM user AS user
                WHERE userid IN (0,);
    
    MySQL Error   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
    Error Number  : 1064
    Date          : Monday, January 21st 2008 @ 06:44:41 PM
    Script        : http://www.*************.com/online.php
    Referrer      : http://www.*************.com/
    IP Address    : **.***.***.***
    Username      : ******
    Classname     : vB_Database_MySQLi
    MySQL Version : 4.1.22-standard-log
    Any help is appreciated. Thanks!


  • #2
    Invalid SQL errors are almost always related to modified code. To troubleshoot this, the first thing you need to do is remove any hacks or plugins, then see if you still have this problem.

    If so, reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server.

    Next, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
    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


    • #3
      Now funnily enough, I just got this too on Beta 3....switched off all plugins, reverted the template and the files are original.

      Solved it by emptying the SESSION table.

      There must have been a guest online that had some sort of property that was messing up the SQL query.....but I have no idea which one.

      If it happens again I'll take a dump of the SESSION table before I empty it, see if that sheds any light on it.
      MARK.B | vBULLETIN SUPPORT

      TalkNewsUK - My vBulletin 5.5.2 Demo
      AdminAmmo - My Cloud Demo

      Comment


      • #4
        I have got the similar error today. Just for 2 hours.
        Invalid SQL:

        SELECT userid, username, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
        FROM vb_user AS user
        WHERE userid IN (0,1,,1802);

        MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1802)' at line 3
        Error Number : 1064
        Date : Sunday, February 3rd 2008 @ 01:53:20 PM
        Script : http://www.golpo.net/forum/online.php
        Referrer : http://www.golpo.net/forum/
        IP Address : **.***.***.***
        Username : Icy
        Classname : vB_Database
        MySQL Version : 5.0.45-community

        Comment


        • #5
          It's the "WHERE userid IN" bit that's causing the issue, there's a blank field going into the SQL query for some reason.

          I think this is going to have to be reported as a bug, but it'll be a tricky one to pin down.
          MARK.B | vBULLETIN SUPPORT

          TalkNewsUK - My vBulletin 5.5.2 Demo
          AdminAmmo - My Cloud Demo

          Comment


          • #6
            Mine just stopped doing it on its own...really strange...

            Comment


            • #7
              Same error I got right now in vB 3.7 beta 4 .. what's about this error and why we all got this? .. I don't think that I've changed something

              Code:
              Invalid SQL:
              
                          SELECT userid, username, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                          FROM user AS user
                          WHERE userid IN (0,);
              
              MySQL Error   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
              Error Number  : 1064
              Date          : Monday, February 4th 2008 @ 06:59:11 PM
              Script        : http://www.xxx.com/online.php
              Referrer      : http://www.xxx.com/index.php
              IP Address    : x.x.x.xx
              Username      : Support
              Classname     : vB_Database
              MySQL Version : 5.0.45-community-log

              Comment

              Loading...
              Working...
              X