$query = $db->query("SELECT tid,fid,titlefont,author,authorid,subject,postdate,lastpost,lastposter,hits,replies,locked,special,anonymous FROM pw_threads WHERE $sqlwhere $orderby $limit");
$query = $db->query("SELECT tid,fid,titlefont,author,authorid,subject,postdate,lastpost,lastposter,hits,replies,locked,special,anonymous FROM pw_threads WHERE fid<>'0' AND $sqlwhere $orderby $limit");