table_connect_tthreadlog.php 803 B

12345678910111213141516171819202122232425262728293031
  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_connect_tthreadlog.php 29265 2012-03-31 06:03:26Z yexinhao $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_connect_tthreadlog extends discuz_table {
  12. public function __construct() {
  13. $this->_table = 'connect_tthreadlog';
  14. $this->_pk = 'twid';
  15. parent::__construct();
  16. }
  17. public function fetch_max_updatetime_by_tid($tid) {
  18. return DB::result_first('SELECT updatetime FROM %t WHERE tid=%d ORDER BY updatetime DESC LIMIT 1', array($this->_table, $tid));
  19. }
  20. public function fetch_min_nexttime_by_tid($tid) {
  21. return DB::fetch_first('SELECT * FROM %t WHERE tid=%d ORDER BY nexttime ASC LIMIT 1', array($this->_table, $tid));
  22. }
  23. }