PDA


View Full Version : Column 'iconid' in from clause is ambiguous


stitch
11-14-2005, 03:04 AM
Hello

I have a fresh install on vba cmps for 3.5.1 and I go this error when I enable the news module


Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT IF(votenum >= 1, votenum, 0) AS numbvote, IF(votenum >= 1 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
thread.threadid, post.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext, allowsmilie, forum.title AS forumtitle

,thread.iconid AS threadiconid, iconpath AS threadiconpath
, avatarpath, NOT ISNULL(filedata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision
, NOT ISNULL(subscribethread.subscribethreadid) AS subscribed
FROM thread AS thread
LEFT JOIN forum AS forum USING (forumid)
LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN icon USING (iconid)
LEFT JOIN user AS user ON (user.userid = post.userid)



LEFT JOIN avatar as avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN customavatar as customavatar ON (customavatar.userid = user.userid)

LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = '1')
LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE thread.threadid IN(3315,2384,1697,1634,1449,548,549,407,174,5181)

GROUP BY post.postid
ORDER BY sticky DESC,thread.dateline DESC
LIMIT 10;

MySQL Error : Column 'iconid' in from clause is ambiguous
Error Number : 1052

Brian
11-15-2005, 02:14 PM
http://www.vbadvanced.com/forum/showthread.php?t=12197

stitch
11-16-2005, 06:44 PM
Thanks it works perfectly