table_forum_threadimage.php 889 B

123456789101112131415161718192021222324252627282930313233343536
  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_threadimage.php 31800 2012-10-11 02:43:06Z zhengqingpeng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_forum_threadimage extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'forum_threadimage';
  15. $this->_pk = '';
  16. parent::__construct();
  17. }
  18. public function delete($tid) {
  19. return ($tid = dintval($tid)) ? DB::delete('forum_threadimage', "tid='$tid'") : false;
  20. }
  21. public function delete_by_tid($tids) {
  22. return !empty($tids) ? DB::delete($this->_table, DB::field('tid', $tids)) : false;
  23. }
  24. public function fetch_all_order_by_tid($start = 0, $limit = 0) {
  25. return DB::fetch_all('SELECT * FROM %t ORDER BY tid DESC '.DB::limit($start, $limit), array($this->_table), 'tid');
  26. }
  27. }
  28. ?>