table_home_pokearchive.php 748 B

123456789101112131415161718192021222324252627282930313233
  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_home_pokearchive.php 27449 2012-02-01 05:32:35Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_home_pokearchive extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'home_pokearchive';
  15. $this->_pk = 'pid';
  16. parent::__construct();
  17. }
  18. public function fetch_all_by_pokeuid($pokeuid) {
  19. return DB::fetch_all('SELECT * FROM %t WHERE pokeuid=%d ORDER BY dateline', array($this->_table, $pokeuid));
  20. }
  21. public function delete_by_dateline($dateline) {
  22. DB::query('DELETE FROM %t WHERE dateline<%d', array($this->_table, $dateline));
  23. }
  24. }
  25. ?>