_table = 'forum_threadaddviews'; $this->_pk = 'tid'; $this->_pre_cache_key = 'forum_threadaddviews_'; $this->_cache_ttl = 0; parent::__construct(); } public function update_by_tid($tid) { return DB::query('UPDATE %t SET `addviews`=`addviews`+1 WHERE tid=%d', array($this->_table, $tid)); } public function fetch_all_order_by_tid($start = 0, $limit = 0) { return DB::fetch_all('SELECT * FROM %t ORDER BY tid'.DB::limit($start, $limit), array($this->_table), $this->_pk); } } ?>