vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   SQL database error (prolly from plugin) (https://vborg.vbsupport.ru/showthread.php?t=143203)

PayBas 03-26-2007 11:40 AM

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)'


Marco van Herwaarden 03-26-2007 12:31 PM

Please post the full error message, you have left out the most important part.

PayBas 03-26-2007 01:23 PM

Hehe, thats what I said to them too :D. I'll post it asap.

Marco van Herwaarden 03-26-2007 08:08 PM

Yu can still get the full error from your technical email, where it is also sent.

PayBas 04-02-2007 12:30 AM

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

WetWired 04-02-2007 01:14 AM

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)';

ZomgStuff 04-02-2007 01:41 AM

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

PayBas 04-02-2007 02:13 AM

Thx for swift reply, I'll try it in the morning :)

Marco van Herwaarden 04-02-2007 08:18 AM

Quote:

Originally Posted by ZomgStuff (Post 1218017)
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.


All times are GMT. The time now is 02:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01430 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete