vBulletin Database Error - MySQL Syntax Missing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24188
    • 5.7.X

    #16


    This may be because of an upload error. Try re-uploading the files again ensuring that all files are overwritten completely. It may be worth looking at completely deleting all vBulletin files from your server then uploading them from scratch (except install/install.php). If you do this, then make sure you also rename config.php.new to config.php and re-enter the relevant information into that file.
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • bitterwaitress
      New Member
      • Jan 2010
      • 10
      • 4.0.0

      #17
      I don't know if this is helpful, but here is the error I've been getting:

      Code:
      Database error in vBulletin 4.0.0:
      
      Invalid SQL:
      
      				SELECT thread.threadid
      				FROM xxxxxxxxxx AS thread
      				
      				WHERE thread.forumid IN()
      					AND thread.lastpost >= 1263632120
      					AND thread.open <> 10
      				ORDER BY thread.lastpost desc
      				LIMIT 75;
      
      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 thread.lastpost >= 1263632120
      					AND thread.open <> 10
      				ORDER' at line 4
      Error Number *: 1064
      Request Date *: Sunday, January 17th 2010 @ 02:55:20 AM
      Error Date ***: Sunday, January 17th 2010 @ 02:55:20 AM
      Script *******: http://bitterwaitress.com/forums/search.php?do=getdaily&contenttype=vBForum_Post
      Referrer *****: http://bitterwaitress.com/forums/blog.php
      IP Address ***: xx.xxx.xxx.x
      Username *****: Unregistered
      Classname ****: vB_Database
      MySQL Version :
      and it stopped happening after I disabled searching forums and blogs and viewing attachments for Unregistered users.

      (All my errors were Unregistered users)


      eta: this was my first and only ever installation of this database
      Last edited by bitterwaitress; Sun 17 Jan '10, 3:47pm. Reason: additional info

      Comment

      • TXGunTalk
        Member
        • Feb 2008
        • 49
        • 3.6.x

        #18
        Originally posted by Trevor Hannant
        http://www.vbulletin.com/forum/proje...?issueid=34851

        This may be because of an upload error. Try re-uploading the files again ensuring that all files are overwritten completely. It may be worth looking at completely deleting all vBulletin files from your server then uploading them from scratch (except install/install.php). If you do this, then make sure you also rename config.php.new to config.php and re-enter the relevant information into that file.
        I re-uploaded everything in the 4.0.0 to 4.0.1 Fix and neither the update nor the overwrite has fixed the issue.

        Any ideas?

        Comment

        • Gil
          New Member
          • Aug 2005
          • 2
          • 3.0.8

          #19
          Same error

          I have also got this error since a clean installl of vB 4.0

          Code:
          Database error in vBulletin 4.0.0:
          Invalid SQL:
           
                         SELECT thread.threadid, thread.title
                         FROM vb4_thread AS thread
                         WHERE forumid = 82
                                 AND visible = 1
                                 AND open <> 10
                                 AND postuserid NOT IN (274)
                         AND lastpost >
                         ORDER BY lastpost
                         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 'ORDER BY lastpost
                         LIMIT 1' at line 11
          
          Error Number  : 1064
          Request Date  : Sunday, February 14th 2010 @ 07:22:58 PM
          Error Date    : Sunday, February 14th 2010 @ 07:22:58 PM
          Script        : [URL]http://www.masscops.com/court-procedure/1782-evidence-next-thread.html[/URL]
          Referrer      :
          IP Address    : 77.88.42.26
          Username      : Unregistered
          Classname     : vB_Database
          MySQL Version :

          Comment

          • Trevor Hannant
            vBulletin Support
            • Aug 2002
            • 24188
            • 5.7.X

            #20
            Try

            - re-downloading the package from the members area
            - deleting all vBulletin files
            - uploading the package to your server again (ensure that all non-image files are uploaded in ASCII format)
            - disable all modifications/plugins/products (except vB Blog and vB CMS if installed)

            Do you still get the error?
            Vote for:

            - Admin Settable Paid Subscription Reminder Timeframe (vB6)
            - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

            Comment

            • TXGunTalk
              Member
              • Feb 2008
              • 49
              • 3.6.x

              #21
              There's been several re-writes ... 4.0.0 --> 4.0.1 --> 4.0.2 ... and neither have remedied the issue.

              Comment

              • mhme
                New Member
                • Jun 2004
                • 4
                • 3.8.x

                #22
                This problem because of error in sql syntax: " AND lastpost > "
                There is no number after ">" !

                This is occurred on "Next Thread" link when current thread is last one.
                I have this problem too. it seams there is a bug.

                Comment

                • Visualbrother
                  New Member
                  • Feb 2006
                  • 17
                  • 5.0.0

                  #23
                  Had the same problem with a clean install, but it has vbSEO installed, when turned off the error is gone, so perhaps it is not a mySQL problem but a re-write problem.

                  update:

                  Set the VB friendly url's to: Standard URLs and turned off Enforce Canonical URL for Registered Users

                  Stuff used:

                  vb 4.03 + vbSEO 3.5.0

                  After this I can not replicated the error anymore
                  Last edited by Visualbrother; Sun 18 Apr '10, 4:21pm. Reason: updated and seem to have solved my problem

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎