table_common_myapp.php 704 B

123456789101112131415161718192021222324252627282930
  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_myapp.php 27906 2012-02-16 08:15:08Z zhengqingpeng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_common_myapp extends discuz_table
  12. {
  13. public function __construct() {
  14. $this->_table = 'common_myapp';
  15. $this->_pk = 'appid';
  16. parent::__construct();
  17. }
  18. public function fetch_all_by_flag($flag, $glue = '=', $sort = 'ASC') {
  19. $glue = helper_util::check_glue($glue);
  20. return DB::fetch_all("SELECT * FROM %t WHERE flag{$glue}%d ORDER BY ".DB::order('displayorder', $sort), array($this->_table, $flag), $this->_pk);
  21. }
  22. }
  23. ?>