table_home_blogfield.php 905 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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_home_blogfield.php 27740 2012-02-13 10:05:22Z chenmengshu $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_home_blogfield extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'home_blogfield';
  15. $this->_pk = 'blogid';
  16. parent::__construct();
  17. }
  18. public function delete_by_uid($uids) {
  19. if(!$uids) {
  20. return null;
  21. }
  22. return DB::delete($this->_table, DB::field('uid', $uids));
  23. }
  24. public function fetch_targetids_by_blogid($blogid) {
  25. return DB::fetch_first('SELECT target_ids, hotuser FROM %t WHERE blogid = %d', array($this->_table, $blogid));
  26. }
  27. public function fetch_tag_by_blogid($blogid) {
  28. return DB::result_first('SELECT tag FROM %t WHERE blogid = %d', array($this->_table, $blogid));
  29. }
  30. }
  31. ?>