hmm i think this should work, but you have t make sure the entries for lastreads do exist!
PHP Code:
$threads = $DB_site->query("
SELECT threadid
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS delthread ON(delthread.primaryid = thread.threadid AND delthread.type = 'thread')
LEFT JOIN " . TABLE_PREFIX . "lastreads AS lastreads ON(lastreads.lr_forum = thread.forumid AND lr_member = $bbuserinfo[userid])
WHERE forumid IN(" . implode(', ', $forumids) . ")
AND thread.lastpost >= lastreads.lr_lastviewed
AND visible = 1
AND delthread.primaryid IS NULL
AND NOT lastreads.lastreads_id IS NULL
AND sticky IN (0,1)
ORDER BY lastpost DESC
LIMIT $vboptions[maxresults]
");