stat_collection.php 612 B

123456789101112131415161718192021222324
  1. <?php
  2. defined('InShopNC') or exit('Access Invalid!');
  3. class stat_collectionControl extends SystemControl
  4. {
  5. public function __construct(){
  6. parent::__construct();
  7. }
  8. public function indexOp()
  9. {
  10. $mod_favorites = Model('favorites');
  11. $cond = array('fv_type=goods');
  12. $on = 'goods.goods_id=favorites.fav_id';
  13. $mod_goods = Model();
  14. $result = $mod_goods->table('goods,favorites')->join('inner')->on($on)->field('goods_name,goods_id,count(*) as nc_count')->group('fav_id')->where($cond)->select();
  15. Tpl::showpage('stat.collection.list');
  16. }
  17. }