Need to record the number of orders placed every day
Every day is from 1, 2, 3...8, 9, 10
// 今天结束时间戳
$end = mktime(0,0,0,date('m'),date('d') + 1,date('Y');
if(time() >= $end){
// 继续添加
}else{
// 重新开始
}
这样算是不对的,因为
mktime(0,0,0,date('m'),date('d') + 1,date('Y');
永远都是第二天.
How to calculate it?
天蓬老师2017-06-24 09:44:23
I think. The conditions that the questioner wants to calculate cannot be solved simply by relying on built-in functions.
No matter you get the end time of the day, the revelation time, or any other time, it will not work The database takes out the previous order record for comparison, but nothing can be seen.
So it is recommended to save the order time when recording orders, and when there is a new order, take out the previous record for comparison. In this case, there are many implementation methods Well, it should go without saying.
女神的闺蜜爱上我2017-06-24 09:44:23
After reading it twice, I don’t understand what you are asking? Is there something wrong with my understanding?