87,994
社区成员
发帖
与我相关
我的任务
分享
$date=strtotime(date("Y-m-d",$this->time)." 00:00:00");
$date2=strtotime(date("Y-m-d",$this->time-24*3600)." 00:00:00");
$date3=strtotime(date("Y-m-d",$this->time-48*3600)." 00:00:00");
$date4=strtotime(date("Y-m-d",$this->time-72*3600)." 00:00:00");
$date5=strtotime(date("Y-m-d",$this->time-96*3600)." 00:00:00");
$date6=strtotime(date("Y-m-d",$this->time-120*3600)." 00:00:00");
$date7=strtotime(date("Y-m-d",$this->time-144*3600)." 00:00:00");
$sql="select count(uid) allUser, sum(regTime>=$date) todayReg, sum(regTime>=$date2 and regTime<=$date) yesterdayReg, sum(regTime>=$date3 and regTime<=$date) qiantianrsReg, sum(regTime>=$date4 and regTime<=$date) dqiantReg, sum(regTime>=$date5 and regTime<=$date) ddqiantReg, sum(regTime>=$date6 and regTime<=$date) dddqiantReg,sum(regTime>=$date7 and regTime<=$date) ddddqiantReg,sum(type) dlCount, sum(type=0) memberCount, sum(coin+fcoin) amountCount from {$this->prename}members where isDelete=0";
//下面这个sql5读的数据是当天24小时的,我想让它拿昨天的数据,也就是减24小时,但是不知道怎么写,求大神帮帮忙,谢谢了
$sql5="select sum(r.amount) from {$this->prename}member_recharge r, {$this->prename}members u where r.actionTime between $date and $date+24*3600 and r.state in (1,2,9) and r.isDelete=0 and r.uid=u.uid"; //充值总额
$data5=$this->getValue($sql5);