table_forum_hotreply_member.php 740 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. if(!defined('IN_DISCUZ')) {
  3. exit('Access Denied');
  4. }
  5. class table_forum_hotreply_member extends discuz_table {
  6. public function __construct() {
  7. $this->_table = 'forum_hotreply_member';
  8. $this->_pk = '';
  9. parent::__construct();
  10. }
  11. public function fetch($pid, $uid) {
  12. return DB::fetch_first('SELECT * FROM %t WHERE pid=%d AND uid=%d', array($this->_table, $pid, $uid));
  13. }
  14. public function delete_by_tid($tid) {
  15. if(empty($tid)) {
  16. return false;
  17. }
  18. return DB::query('DELETE FROM %t WHERE tid IN (%n)', array($this->_table, $tid));
  19. }
  20. public function delete_by_pid($pids) {
  21. if(empty($pids)) {
  22. return false;
  23. }
  24. return DB::query('DELETE FROM %t WHERE '.DB::field('pid', $pids), array($this->_table));
  25. }
  26. }
  27. ?>