首页 > 作文

TP SQL统计查询语法

更新时间:2023-04-08 03:08:00 阅读: 评论:0

获取今日订单总数和订单总金额

 //fields区分出order_type不等于1的订单,订单金额money加运费order_freight合计 $fields = [     'count(1) as orde婆婆照顾植物儿媳r_num',     'sum(if(order_type != 1, money + order_freight, 0)) as order_price' ]; //where区分统计今日订单,已付款pay_status状态 $where = [     [         'create_time',         'between',         strtotime(date('y-m-d')).','.strtotime(date('y-m-d 23:59:59')),     ],     力距[         'pay_stat创意糖果us','=',1,意大利首都     ] ]; $static = $this->field($field)->where($where)->where('is_deleted', 0)->find(); return $st我家的春节作文atic ? $static->toarray() : [];

本文发布于:2023-04-08 03:07:58,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/6bcd0570504895f80a89c80c16a66250.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:TP SQL统计查询语法.doc

本文 PDF 下载地址:TP SQL统计查询语法.pdf

下一篇:返回列表
标签:订单   今日   意大利   创意
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图