帝国CMS后台支付记录统计总、年、月、日收入代码

时间:2024年04月01日

/

来源:网络

/

编辑:佚名

修改/e/admin/pay/ListPayRecord.php
在 ?>上面添加以下代码
$year=date('Y'); //读取当前年份
$month=date('Y-m'); //读取当前年月份
$day=date('Y-m-d'); //读取当前年月日份
$hj=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord");
$hj=$hj['money']; //合计
$year=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$year."%'");
$year=$year['money']; //年合计
$month=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$month."%'");
$month=$month['money']; //月合计
$day=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$day."%'");
$day=$day['money']; //日合计 
在任意地方输出php内容:总收入<?=$hj?>元,今年收入<?=$year?>元,月收入<?=$month?>元,日收入<?=$day?>元。
猜你需要

豫ICP备2021026617号-1  豫公网安备:41172602000185   Copyright © 2021-2028 www.78moban.com/ All Rights Reserved

本站作品均来自互联网,转载目的在于传递更多信息,并不代表本站赞同其观点和对其真实性负责。如有侵犯您的版权,请联系 1565229909#qq.com(把#改成@),我们将立即处理。