Database error in vBulletin 4.1.10:
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.firstpostid, post.pagetext AS thumb,
thread.threadid, thread.title AS threadtitle, thread.forumid, thread.pollid, thread.open, thread.postusername, thread.postuserid, thread.iconid AS threadiconid,
thread.dateline, thread.notes, thread.visible, thread.sticky, thread.votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastposterid, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views, thread.strike, thread.color,
thread.prefixid, thread.taglist, thread.hiddencount, thread.deletedcount,
user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend,
user.lastactivity, user.lastvisit, IF(user.options & 512, 1, 0) AS invisible
, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
, threadread.readtime AS threadread
, threadredirect.expires
, user.market_username_color AS last_color,
user.market_username_glow AS last_glow, thread.LAM_BanFromThread, post.pagetext AS previewhide, bop_ugroup.opentag as bop5_opentags, bop_ugroup.closetag AS bop5_closetags , thread.bop_global ,IF(customavatar.userid, 1, 0) AS useavatar, uposter.userid AS useravatarid, uposter.avatarrevision
, user.avatarrevision AS avatarrevision, thread.lastposterid AS userid, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight
FROM vbthread AS thread
LEFT JOIN vbuser AS user ON (user.userid = thread.lastposterid)
LEFT JOIN vbuserlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 3)
LEFT JOIN vbdeletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
LEFT JOIN vbthreadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = 3)
LEFT JOIN vbpost AS post ON(post.postid = thread.firstpostid)
LEFT JOIN vbthreadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
LEFT JOIN vbuser AS bop_user ON (thread.postuserid = bop_user.userid) LEFT JOIN vbusergroup AS bop_ugroup ON (bop_user.usergroupid = bop_ugroup.usergroupid)
LEFT JOIN vbuser AS uposter ON (uposter.userid = thread.postuserid)
LEFT JOIN vbcustomavatar AS customavatar ON (customavatar.userid = uposter.userid)
LEFT JOIN vbavatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN vbcustomavatar AS customavatar ON(customavatar.userid = user.userid)
WHERE thread.threadid IN (0,123421,164035,163423,163416,162902,163027,16340 9,162431,162433,162909,164006, 163993,163594,163415,159946,161244,162424,162945,1 62419,160385)
ORDER BY thread.sticky DESC, lastpost DESC;
MySQL Error : Not unique table/alias: 'customavatar'
Error Number : 1066
Request Date : Wednesday, January 30th 2013 @ 11:19:04 PM
Error Date : Wednesday, January 30th 2013 @ 11:19:05 PM
|