Invalid SQL.....pls help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chelo
    New Member
    • Nov 2005
    • 11

    Invalid SQL.....pls help

    hi, can some help me pls, i have lost my db and there is no backup due to a run away admin.... i have a bbpost backedup but its only 3kb!!! i dont think thats correct....how can i rebuild my forum? below is the error.

    regards

    Invalid SQL:

    SELECT
    IF(votenum >= 1, votenum, 0) AS votenum,
    IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
    post.pagetext AS preview,
    thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
    thread.lastpost, thread.lastposter, thread.lastpostid, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach,
    hiddencount, deletedcount
    , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
    , deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason

    , threadredirect.expires

    FROM bbthread AS thread
    LEFT JOIN bbdeletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
    LEFT JOIN bbsubscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 3 AND canview = 1)

    LEFT JOIN bbpost AS post ON(post.postid = thread.firstpostid)

    LEFT JOIN bbthreadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)

    WHERE thread.threadid IN (0,5028,5017,5027,5022,5023,11,5025,5026,5020,5021,4838,5014,5016,5011,5004,4996,4987,5015 ,5012,4982)
    ORDER BY sticky DESC, lastpost DESC;

    MySQL Error : Can't open file: 'bbpost.MYI' (errno: 145)
    Error Number : 1016
    Date : Thursday, October 18th 2007 @ 04:10:41 PM
    Script : http://www.iranunited.com/forums/forumdisplay.php?f=11
    Referrer : http://www.iranunited.com/forums/index.php
    IP Address : 87.201.155.118
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    MySQL error: 145 = Table was marked as crashed and should be repaired

    This error means that table has crashed. To fix this run Repair/Optimize in the Admin CP. You may need to run it more than once to fix all errors:

    Admin CP -> Import & Maintenance -> Repair/Optimize Tables -> Check All -> Continue

    If you cannot open your Admin CP then you can repair tables with phpMyAdmin.
    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

    • chelo
      New Member
      • Nov 2005
      • 11

      #3
      Thx Steve, but i have tried the repair option (maybe around 5times) and it hasnt worked!
      and each time it comes with this error. all others pass ok apart from bbpost.

      bbpost Check Error: Found 126 keys of 38963 bbpost Check Error: Corrupt



      Invalid SQL:
      REPAIR TABLE `bbpost`;

      MySQL Error : Lost connection to MySQL server during query
      Error Number : 2013
      Date : Thursday, October 18th 2007 @ 08:10:52 PM
      Script : http://www.iranunited.com/forums/adm...hp?do=dorepair
      Referrer : http://www.iranunited.com/forums/adm...ir.php?do=list
      Username : Chelo
      Classname : vb_database

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        This is a server problem. Please see this page for the causes of this error:

        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

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