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