HTML Code:
Database error in vBulletin 4.1.9:
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.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
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
, threadredirect.expires
,IF(customavatar.userid, 1, 0) AS useavatar, user.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 thread AS thread
LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 1)
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
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 customavatar AS customavatar ON (customavatar.userid = thread.postuserid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
WHERE thread.threadid IN (0,7,1)
ORDER BY thread.sticky DESC, lastpost DESC;
MySQL Error : Not unique table/alias: 'customavatar'
Error Number : 1066
Request Date : Wednesday, January 11th 2012 @ 01:07:59 PM
Error Date : Wednesday, January 11th 2012 @ 01:07:59 PM
Script : http://www.mysite.com/forums/forumdisplay.php?2-mysite-com-Announcements
Referrer : http://www.mysite.com/forums/forum.php
IP Address : 67.59.x.x
Username : adminaccount
Classname : vB_Database
MySQL Version : 5.0.90-community-nt