Log in

View Full Version : Invalid SQL Help


nkmsw8
12-25-2009, 08:56 PM
Hey folks, I have been lurking here for awhile and learned a lot about forum management. My forum has been doing good for over a year now but today I got this error when trying to access the discussion pages of the forum. I'm a newb to VBulletin and so this is all greek to me. What does this al mean and how do I fix it. Thanks.

Database error in vBulletin 3.7.0:

Invalid SQL:

SELECT post.pagetext AS preview,
thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid, thread.dateline, thread.forumid,
thread.sticky, thread.prefixid, thread.taglist, thread.pollid, thread.open, thread.lastpost AS postdateline, thread.visible,
thread.hiddencount, thread.deletedcount, thread.attach, thread.postusername, thread.forumid,

replycount, IF(views<=replycount, replycount+1, views) AS views,
thread.lastpost, thread.lastposter, thread.lastpostid
,
deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,
user.userid AS postuserid
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed


FROM thread AS thread
LEFT JOIN user AS user ON(user.userid = thread.postuserid)

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

LEFT JOIN subscribethread AS subscribethread
ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 2 AND canview = 1)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)


WHERE thread.threadid IN
(413, 8230, 8241, 8283, 8404, 8395, 8403, 8401, 8405, 8336, 8396, 8388, 8320, 8399, 8253, 8347, 8382, 8400, 8402, 8393, 7965, 8350, 8324, 8186, 8353);

MySQL Error : Table './nkmsw/post' is marked as crashed and last (automatic?) repair failed
Error Number : 144
Request Date : Friday, December 25th 2009 @ 03:50:35 PM
Error Date : Friday, December 25th 2009 @ 03:50:35 PM
Script : http://floridaconcealedcarry.com/Forum/search.php?searchid=269062
Referrer : http://floridaconcealedcarry.com/Forum/index.php
IP Address : edited out
Username : NkmG19
Classname : vB_Database
MySQL Version : 5.0.67.d7-ourdelta-log

Lynne
12-25-2009, 09:09 PM
Your post table has crashed. Go to Admin CP > Maintenance > Repair/Optimize Tables > select the Post table > Repair/Optimize it. You may have to do that a couple of times until it says everything is OK.

nkmsw8
12-25-2009, 09:14 PM
Thanks, I'm doing that now. How long does it usually take to complete that task.

--------------- Added 1261783594 at 1261783594 ---------------

Thank you Lynne. everything is back to normal now. You guys are great. :up: