table_common_friendlink.php 710 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_common_friendlink.php 27449 2012-02-01 05:32:35Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_common_friendlink extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'common_friendlink';
  15. $this->_pk = 'id';
  16. parent::__construct();
  17. }
  18. public function fetch_all_by_displayorder($type = '')
  19. {
  20. $args = array($this->_table);
  21. if($type) {
  22. $sql = 'WHERE (`type` & %s > 0)';
  23. $args[] = $type;
  24. }
  25. return DB::fetch_all("SELECT * FROM %t $sql ORDER BY displayorder", $args, $this->_pk);
  26. }
  27. }
  28. ?>