Php time judgment for help is now based on an activity that lasts for four weeks. 25 lottery tickets are required each week for users to draw, and 4 ceil (257) can be drawn on average every day, however, the actual number of hits per day is the number of theoretical hits today + the number of remaining hits yesterday. here, the database needs to automatically write the remaining number of hits today to the remaining number of hits yesterday at each day, how can I determine the time? I want to update the remaining number of coupons to 25 and the remaining number of last week at every Monday of every week.
Now, we have an activity that lasts for four weeks. we need to issue 25 lottery tickets each week for users to draw. on average, we can draw 4 ceil (25/7) coupons every day, however, the actual number of hits per day is the number of theoretical hits today + the number of remaining hits yesterday. here, the database needs to automatically write the remaining number of hits today to the remaining number of hits yesterday at each day, how should we judge this time? I want to update the number of remaining vouchers to 25 and the remaining number of last week at every Monday of every week, how should I write in php.
------ Solution --------------------
1. "Today's number of prizes = today's theoretical lottery + yesterday's remaining prizes" is completed at, rather than "writing the remaining number of today's prizes to the remaining number of yesterday's prizes"
2. although you can set scheduled tasks to meet your requirements, you may not have the permission to implement the tasks because the operating system is involved.
3. you only need to set the meter field to record the first entry every day, and complete the calculation and storage of today's rewards