Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2007, 11:40 AM
PayBas PayBas is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default SQL database error (prolly from plugin)

Some of my users are experiencing problems, I on the other hand am not :P. But I can't seem to find the cause.

Code:
Database error in vBulletin 3.6.5: 

Invalid SQL: 

        SELECT  
            IF(votenum >= 100, votenum, 0) AS votenum, 
            IF(votenum >= 100 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 
            ,thread_user.usergroupid, thread_user.membergroupids, thread_user.userid 
        FROM php_thread AS thread 
            LEFT JOIN php_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread') 
             LEFT JOIN php_subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
I think it's caused by this small plugin but not 100% sure:
PHP Code:
$hook_query_fields .= ',thread_user.usergroupid, thread_user.membergroupids, thread_user.userid'
$hook_query_joins .= 'LEFT JOIN user AS thread_user ON(thread.postuserid = thread_user.userid)'
Reply With Quote
  #2  
Old 03-26-2007, 12:31 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post the full error message, you have left out the most important part.
Reply With Quote
  #3  
Old 03-26-2007, 01:23 PM
PayBas PayBas is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehe, thats what I said to them too . I'll post it asap.
Reply With Quote
  #4  
Old 03-26-2007, 08:08 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yu can still get the full error from your technical email, where it is also sent.
Reply With Quote
  #5  
Old 04-02-2007, 12:30 AM
PayBas PayBas is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I finally got it:

Code:
Database error in vBulletin 3.6.5:

Invalid SQL:

		SELECT  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
			,thread_user.usergroupid, thread_user.membergroupids, thread_user.userid
		FROM veh_thread AS thread
			LEFT JOIN veh_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
			 LEFT JOIN veh_subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
			
			LEFT JOIN veh_post AS post ON(post.postid = thread.firstpostid)
			
			LEFT JOIN veh_threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
			LEFT JOIN user AS thread_user ON(thread.postuserid = thread_user.userid)
		WHERE thread.threadid IN (0) 
		ORDER BY sticky DESC, lastpost DESC;

MySQL Error  : Table '28_vorum.user' doesn't exist
Error Number : 1146
Date         : Monday, April 2nd 2007 @ 04:48:18 AM
Script       : http://xxxxx/forum/forumdisplay.php?f=6
Referrer     : http://xxxxx/forum/index.php
IP Address   : xxx.xxx.xxx.xxx
Username     : xxxxx
Classname    : vB_Database
And it's caused by this plugin:
PHP Code:
$hook_query_fields .= ',thread_user.usergroupid, thread_user.membergroupids, thread_user.userid'
$hook_query_joins .= 'LEFT JOIN user AS thread_user ON(thread.postuserid = thread_user.userid)'
Hook: forumdisplay_query
Reply With Quote
  #6  
Old 04-02-2007, 01:14 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
$hook_query_joins .= 'LEFT JOIN user AS thread_user ON(thread.postuserid = thread_user.userid)';
becomes
Code:
$hook_query_joins .= 'LEFT JOIN '.TABLE_PREFIX.'user AS thread_user ON(thread.postuserid = thread_user.userid)';
Reply With Quote
  #7  
Old 04-02-2007, 01:41 AM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You must have dot5hosting. I have the same problem. Their SQL server ran out of room on the partition. The dirtbags don't have teach support over the weekend. I'm going to get my money back tomorrow Guess we all have to wait till tomorrow.


See my post here;
https://vborg.vbsupport.ru/showthread.php?t=143804
Reply With Quote
  #8  
Old 04-02-2007, 02:13 AM
PayBas PayBas is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx for swift reply, I'll try it in the morning
Reply With Quote
  #9  
Old 04-02-2007, 08:18 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ZomgStuff View Post
You must have dot5hosting. I have the same problem. Their SQL server ran out of room on the partition. The dirtbags don't have teach support over the weekend. I'm going to get my money back tomorrow Guess we all have to wait till tomorrow.


See my post here;
https://vborg.vbsupport.ru/showthread.php?t=143804
Please do not jump to conclusions or spam your frustrations to multiple threads, especially as there is no indication that your problem has anything to do with this one.

As WetWired replied, this is simply a case of a plugin that does not use the TABLE_PREFIX.
Reply With Quote
Reply


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:43 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.04138 seconds
  • Memory Usage 2,250KB
  • 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
  • (4)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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