联系官方销售客服
1835022288
028-61286886
获取本月的第一天和最后一天,以及本月的消费收入待付款的总额
<?php $now = time(); //获取类似2020-01-01和2020-01-31 $month_audit_num = 0; $month_use_num = 0; $beginTime = strtotime(date('Y-m-d 00:00:00', mktime(0, 0, 0, date('m', $now), '1', date('Y', $now)))); $endTime = strtotime(date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)))); $rt = \Phpcmf\Service::M()->db->table("member_paylog")->select('sum(value) as xiaofei')->where('value <', '0')->where('uid', $member.id)->where('inputtime >', $beginTime)->where('inputtime <', $endTime)->where('status',1)->get(); if ($rt) { $rows = $rt->getRowArray(); $xiaofei = $rows['xiaofei']*-1; } $rts = \Phpcmf\Service::M()->db->table("member_paylog")->select('sum(value) as shouyi')->where('value >', '0')->where('uid', $member.id)->where('inputtime >', $beginTime)->where('inputtime <', $endTime)->where('status',1)->get(); if ($rts) { $rows = $rts->getRowArray(); $shouyi = $rows['shouyi']; } $rtf = \Phpcmf\Service::M()->db->table("member_paylog")->select('sum(value) as shouyi')->where('value >', '0')->where('uid', $member.id)->where('inputtime >', $beginTime)->where('inputtime <', $endTime)->where('status',0)->get(); if ($rtf) { $rows = $rtf->getRowArray(); $daifk = $rows['daifk']; } ?>
Booid.com