日志表有一个记录用户事件产生的时间戳字段( helptime),根据userid怎么查询日志表中该userid上一次事件产生经过次日0点的记录,(是接口中的代码噢)
已经好了,先 $dayBegin = strtotime(date('Y-m-d', time())); 取的今天的0点时间戳,再写个查询的sql语句$ulog = $helplogModel->where('helptime','>=',$dayBegin)->where(array("userid"=>$obj["userid"],"zid"=>$obj["zid"]))->select(); 就能得出结果了。
https://blog.csdn.net/u012767761/article/details/80197598
39929_20068.jpg)