当前位置: 首页 > 工具软件 > TP-COUPON > 使用案例 >

tp3.2group和sum的联合使用

陈毅
2023-12-01
$res = M('settlement')
            ->field(['*','sum(total_amount)'=>'total_amount','sum(price)'=>'price','sum(agent_coupon_price)'=>'agent_coupon_price','sum(integral_money)'=>'integral_money','sum(settlement_price)'=>'settlement_price','sum(price_back)'=>'price_back','sum(clean_price)'=>'clean_price'])
            ->group('uid')
            ->select();

 

转载于:https://my.oschina.net/u/4054486/blog/3085281

 类似资料: