There is a condition for sampling expiration in this case, VIP privileges. vip_data field
(`vip_data` - INTERVAL 1 DAY > NOW()) AND (`vip_data` - INTERVAL 2 DAY < NOW()) This is a condition for sending a letter, saying that tomorrow your VIP privileges end. The word tomorrow is far from always true, for everything depends on several components
- 1 when the email sending script runs
- 2 when vip privileges end
- 3 how many times a day the script runs
If the script is launched once a day, we have large errors and even omissions to send alert letters.
How to build a notification scheme in this case?
What is the right way to choose those that end today , with existing entries in the database, regardless of when the script is launched?
vip_data > now()+inteval 1 daythat no calculations are performed on the database field, and once was considered a constant - Mike