Announcement

Collapse
No announcement yet.

Sudden problem with database

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

  • Sudden problem with database

    I get the following error:

    Database error in vBulletin 3.0.7:
    Invalid SQL:
    SELECT
    IF(votenum >= 1, votenum, 0) AS votenum, IF(votenum >= 1 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
    thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
    , thread.iconid AS threadiconid, iconpath AS threadiconpath
    ,thread.forumid, forum.title AS forumtitle
    , post.pagetext AS preview
    , NOT ISNULL(subscribethread.subscribethreadid) AS subscribed
    FROM thread as thread
    LEFT JOIN icon USING (iconid)
    LEFT JOIN forum AS forum ON (thread.forumid = forum.forumid)
    LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
    LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
    LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = 1)
    WHERE open <> '10' AND thread.visible = 1 AND thread.forumid NOT IN(****, ****, ****, slut, ass*, ******,) AND deletionlog.primaryid IS NULL
    ORDER BY lastpost DESC
    LIMIT 10

    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 deletionlog.primaryid IS NULL
    ORDER BY lastp
    mysql error number: 1064
    Date: Wednesday 02nd of March 2005 08:50:42 PM
    Script: http://www.crimsonsuns.com/index.php?
    Referer: http://www.crimsonsuns.com/admincp/index.php?do=head
    Username: The Great Hitokiri Battousai
    IP Address: 68.163.66.251


    Thank you in advance!!

  • #2
    Nevermind I got it.

    Comment


    • #3
      How did you fix it? I am having the same problem!
      Massie
      http://www.dietsupporters.com

      Comment


      • #4
        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.
        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


        • #5
          I have done this and I'm still getting the same error. Any other ideas?

          Comment


          • #6
            Did you add any users to tatchy goes to conventry?

            Comment


            • #7
              Not sure what you mean.

              This is my exact error message, maybe a little different then above but looked similar.

              Invalid SQL:
              SELECT
              IF(votenum &gt;= 1, votenum, 0) AS votenum, IF(votenum &gt;= 1 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
              thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views &lt;= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
              , thread.iconid AS threadiconid, iconpath AS threadiconpath
              ,thread.forumid, forum.title AS forumtitle
              , post.pagetext AS preview

              FROM thread as thread
              LEFT JOIN icon USING (iconid)
              LEFT JOIN forum AS forum ON (thread.forumid = forum.forumid)
              LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
              LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')

              WHERE open &lt;&gt; '10' AND thread.visible = 1 AND thread.forumid NOT IN(1,2,4,5,6,10,7,8) Array AND deletionlog.primaryid IS NULL
              ORDER BY lastpost DESC
              LIMIT 10

              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 'Array AND deletionlog.primaryid IS NULL
              ORDER BY lastpost D

              Comment


              • #8
                If you have not installed any hacks (which includes portals), fill out a support ticket at:

                http://www.vbulletin.com/members/mem...ontactform.php

                Be sure to include the login info to your Admin CP, phpMyAdmin and FTP.
                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


                • #9
                  I have installed vbadvanced portal but everthing was working fine for months this just started happening all of the sudden with no changes by me.

                  Do I need to contact vbadvanced then?

                  Comment


                  • #10
                    In post #5 you said you uploaded the original files. I guess that wasn't accurate.

                    We cannot provide support for hacked forums. Your options are:

                    1. Remove the hacks (including any database changes) and restore the original vB files.

                    2. Ask for help at the vBAdvanced forums.

                    3. Set up a fresh test forum with all the original vB files and templates. Then if you can reproduce this problem on that forum, let me know. If not, then this will show that the problem is related to one or more changes you made.
                    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


                    • #11
                      Ok thanks for your help.

                      Comment

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