_table = 'portal_rsscache'; $this->_pk = 'aid'; parent::__construct(); } public function fetch_all_by_catid($catid, $limit = 20) { return $catid ? DB::fetch_all('SELECT * FROM '.DB::table($this->_table).' WHERE '.DB::field('catid', $catid).' ORDER BY dateline DESC LIMIT '.dintval($limit), null, 'aid') : array(); } } ?>