if($sort="bump") $tmpSQL = 'SELECT no FROM '.$this->tablename.' WHERE resto = 0 ORDER BY '.($isDESC ? 'no' : 'root').' DESC';elseif($sort = "lastreply") $tmpSQL = 'SELECT resto FROM '.$this->tablename.' WHERE (no, resto) IN (SELECT MAX(no), resto FROM '.$this->tablename.' GROUP BY resto) AND resto != 0 ORDER BY no DESC';...