Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-06-2011, 05:34 PM
MarcInJapan MarcInJapan is offline
 
Join Date: Feb 2008
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database Error! Need Help ASAP.

I was thinking maybe my host/server had issues, but only one of my sites is receiving this error. Can't open posts or threads. Chatbox works fine. Here is what I get when I try to open a post or thread:

Database error in vBulletin 3.8.6:

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, postusername, postuserid, thread.iconid AS threadiconid,
thread.dateline, notes, thread.visible, sticky, votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
thread.prefixid, thread.taglist, hiddencount, deletedcount

, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason

, threadredirect.expires
, post_user.displaygroupid AS post_user_displaygid, post_user.usergroupid AS post_user_usergid, last_post_user.displaygroupid AS last_post_user_displaygid, last_post_user.usergroupid AS last_post_user_usergid
FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')


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

LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
LEFT JOIN user AS last_post_user ON (thread.lastposter = last_post_user.username)
LEFT JOIN user AS post_user ON (thread.postuserid = post_user.userid)
WHERE thread.threadid IN (0,40817,40462,40312,40576,40527,40424,40416,40358 ,40359,39764,39549,39540,39569,39502,39494,39440,3 9360,39364,39222,39299,39291,39072,39128,39071,390 37,39021,38890,38930,38902,38887,23156,30253)
ORDER BY sticky DESC, lastpost DESC;

MySQL Error : Table './ustangs_united3/post' is marked as crashed and should be repaired
Error Number : 145
Request Date : Tuesday, September 6th 2011 @ 10:41:08 AM
Error Date : Tuesday, September 6th 2011 @ 10:41:08 AM
Script : http://www.unitedstangs.com/forums/forumdisplay.php?f=6
Referrer : http://www.unitedstangs.com/forums/index.php
IP Address : 132.3.57.01
Username : Marcus
Classname : vB_Database
MySQL Version : 5.1.56

Is this something that can be repaired? Am I missing a current patch? Or is this a virus?

Your immediate help is appreciated!
Reply With Quote
  #2  
Old 09-06-2011, 06:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try using Repair/Optimize tables under Maintenance in the adminCP. It looks like the post table is causing the error.
Reply With Quote
  #3  
Old 09-07-2011, 07:57 AM
souperman souperman is offline
 
Join Date: Mar 2011
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can also use phpmyadmin if you have that setup. Most control panels include this by default.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08261 seconds
  • Memory Usage 2,177KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete