_table = 'connect_tthreadlog'; $this->_pk = 'twid'; parent::__construct(); } public function fetch_max_updatetime_by_tid($tid) { return DB::result_first('SELECT updatetime FROM %t WHERE tid=%d ORDER BY updatetime DESC LIMIT 1', array($this->_table, $tid)); } public function fetch_min_nexttime_by_tid($tid) { return DB::fetch_first('SELECT * FROM %t WHERE tid=%d ORDER BY nexttime ASC LIMIT 1', array($this->_table, $tid)); } }