Announcement

Collapse
No announcement yet.

Getting database error after upgrade

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

  • Getting database error after upgrade

    I have just upgraded to 3.07 and am now regularly getting the following error message email:
    Database error in vBulletin 3.0.7:

    Invalid SQL:
    SELECT threadid
    FROM thread AS thread
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    WHERE forumid IN () AND visible = 1 AND (sticky = 1 OR sticky = 0)
    AND lastpost >= -30 AND open <> 10 AND deletionlog.primaryid IS NULL
    ORDER BY lastpost DESC
    LIMIT 1

    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 ') AND visible = 1 AND (sticky = 1 OR sticky = 0)
    AND lastpo

    mysql error number: 1064

    Date: Tuesday 29th of March 2005 01:54:57 PM
    Script: http://www.communityarts.net/forums/...ost&forumid=20
    Referer:
    Username: Unregistered
    IP Address: 68.142.250.135

    After checking the boards for similar problems, I've replaced all the vB files, and I've repaired and optimized tables, but neither has worked. Can anyone tell me where to go next?

  • #2
    This is almost certainly a file problem. Reupload the original showthread.php file from the vB 3.0.7 zip file. Make sure you upload in ASCII and overwrite the one on the server.
    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
      Thanks for the suggestion, Steve. Unfortunately, that has not solved the problem. Any other thoughts?

      Comment


      • #4
        Same problem here :\.

        Database error in vBulletin 3.0.7:

        Invalid SQL:
        SELECT threadid
        FROM thread AS thread
        LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
        WHERE forumid IN () AND visible = 1 AND (sticky = 1 OR sticky = 0)
        AND lastpost >= -30 AND open <> 10 AND deletionlog.primaryid IS NULL
        ORDER BY lastpost DESC
        LIMIT 1

        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 ') AND visible = 1 AND (sticky = 1 OR sticky = 0)
        AND lastpo

        mysql error number: 1064

        Date: Thursday 31st of March 2005 04:43:23 PM
        Script: http://forum.xbox-tribe.com/showthre...post&forumid=9
        Referer:
        Username: Non registrato
        IP Address: *******

        Comment


        • #5
          Do you allow HTML in posts or sigs? If so, disable this. Also create a new style and choose no parent style. This will force it to use the default templates. Then change to this 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


          • #6
            No I don't allow HTML.

            Before I try the new style suggestion, however, I have to say that I don't know what kinds of action(s) are generating the error message, so I don't know how to test the success or failure of any changes. (So far I've just been waiting to see if I still got error messages.) Can you tell me, from the error message, what action(s) are causing it?

            Comment


            • #7
              Syntax errors are generally related to a code problem. If it's not the files, then the other place to check would be code added to the templates or posts.

              And creating a new style only takes a minute and does not change anything else on your forums.
              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


              • #8
                Same error here too (server name intentionally removed):

                Database error in vBulletin 3.0.7:

                Invalid SQL:

                SELECT threadid

                FROM thread AS thread

                LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')

                WHERE forumid IN () AND visible = 1 AND (sticky = 1 OR sticky = 0)

                AND lastpost >= -30 AND open <> 10 AND deletionlog.primaryid IS NULL

                ORDER BY lastpost DESC

                LIMIT 1



                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 ') AND visible = 1 AND (sticky = 1 OR sticky = 0)

                AND lastpo

                mysql error number: 1064

                Date: Monday 16th of May 2005 09:20:34 AM

                Script: http://xxx/forum/showthread.php?goto...ost&forumid=10

                Referer:

                IP Address: 68.142.249.107

                Comment


                • #9
                  Re upload all vB non-image files, make sure you upload them in ASCII format.
                  Want to take your board beyond the standard vBulletin features?
                  Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

                  Comment


                  • #10
                    Can I suggest one of you post this in the Bug Track forum, it could be a bug, especially if the same error is being experience by two or more people.

                    The dev team will be able to investigate this further so please provide as much information as possible.

                    Comment


                    • #11
                      It appears to trace back to this...

                      showthread.php references $foruminfo[childlist] (line 223) and $foruminfo['lastpost'] (line 224)
                      ...but $foruminfo doesn't appear to be initialised until further down the script on line 377.

                      I'll post this in bug tracking as requested.

                      Comment


                      • #12
                        Bug posted:

                        http://www.vbulletin.com/forum/bugs....iew&bugid=4025

                        Comment


                        • #13
                          forumid IN ()

                          It's getting passed an empty array.

                          Query is on line 134

                          WHERE forumid IN (0$forumslist)

                          Is that a spurious 0 ?

                          Comment


                          • #14
                            Did you perform an import from another forum software?
                            Scott MacVicar

                            My Blog | Twitter

                            Comment


                            • #15
                              I did, yes. From vB2.

                              Comment

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