code:
SELECT DISTINCT post.userid,
thread.threadid,thread.threadid AS postid,thread.title AS threadtitle,thread.iconid AS threadiconid,thread.replycount,
thread.views,thread.pollid,thread.open,thread.lastpost AS postdateline,thread.lastpost,thread.lastposter, forum.forumid,
forum.title AS forumtitle,forum.allowicons,attach, thread.postusername AS usrname, user.userid AS postuserid,
threadicon.iconpath AS threadiconpath,threadicon.title AS threadicontitle
FROM thread,forum
LEFT JOIN user ON user.username=thread.postusername
LEFT JOIN icon AS threadicon ON thread.iconid=threadicon.iconid
LEFT JOIN post ON (thread.threadid = post.threadid AND post.userid = '2' AND post.visible = 1)
WHERE thread.forumid=forum.forumid AND thread.threadid IN (0,367269,342963,355702)
ORDER BY thread.lastpost DESC
mysql error: Unknown column 'thread.postusername' in 'on clause'
mysql error number: 1054