table_forum_threadprofile.php 749 B

1234567891011121314151617181920212223242526272829303132333435
  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_threadprofile.php 31607 2012-09-13 08:38:40Z monkey $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_forum_threadprofile extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'forum_threadprofile';
  15. $this->_pk = 'id';
  16. parent::__construct();
  17. }
  18. public function fetch_all() {
  19. return DB::fetch_all('SELECT * FROM %t', array($this->table), $this->_pk);
  20. }
  21. public function reset_default($tpid) {
  22. DB::query("UPDATE %t SET `global`=0", array($this->table));
  23. DB::query("UPDATE %t SET `global`=1 WHERE id=%d", array($this->table, $tpid));
  24. }
  25. }
  26. ?>