Something like:
PHP Code:
$sql="SELECT post.postid, post.threadid, post.username, post.userid, post.dateline, post.iconid, post.pagetext, icon.iconid, icon.title, icon.iconpath, thread.threadid, thread.title, thread.lastpost, thread.forumid
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON (post.iconid = icon.iconid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(post.threadid = thread.threadid )
WHERE thread.forumid = 1
ORDER BY post.dateline DESC LIMIT 10";