Do you have a table prefix defined? If so, you need to add an AS to the FROM line, like:
Code:
$topthreads = $db->query_read("
SELECT thread.threadid, thread.title, thread.iconid, icon.iconid, icon.iconpath
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON (icon.iconid = thread.iconid)
ORDER BY threadid ASC LIMIT 5
");
But I guess you don't have a prefix, otherwise the query wouldn't work at all.
In any case, I tried that query in PHPMyAdmin and it works, but note that if a thread doesn't have an icon assigned (and it seems that most do not), the iconpath will be NULL.