table_portal_rsscache.php 693 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: table_portal_rsscache.php 27793 2012-02-14 10:02:48Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_portal_rsscache extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'portal_rsscache';
  15. $this->_pk = 'aid';
  16. parent::__construct();
  17. }
  18. public function fetch_all_by_catid($catid, $limit = 20) {
  19. 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();
  20. }
  21. }
  22. ?>