table_forum_threadlog.php 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_forum_threadlog.php 27449 2012-02-01 05:32:35Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_forum_threadlog extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'forum_threadlog';
  15. $this->_pk = '';
  16. parent::__construct();
  17. }
  18. public function fetch_all_order_by_dateline($start = 0, $limit = 0) {
  19. return DB::fetch_all('SELECT * FROM %t ORDER BY dateline'.DB::limit($start, $limit), array($this->_table));
  20. }
  21. public function delete_by_tid_fid_uid($tids = null, $fids = array(), $uids = array()) {
  22. $condition = array();
  23. if($tids != null) {
  24. $condition[] = DB::field('tid', $tids);
  25. }
  26. if(!empty($fids)) {
  27. $condition[] = DB::field('fid', $fids);
  28. }
  29. if(!empty($uids)) {
  30. $condition[] = DB::field('uid', $uids);
  31. }
  32. return DB::delete($this->_table, DB::field('tid', $tids));
  33. }
  34. }
  35. ?>