How to request a database to automatically reassign a specific value in a table after 24 hours?

Say the player’s energy is written to the table as “20”. When he participates in a mission, his energy decreases and reaches 0. However, the next day it will be replenished to "20". How does the database detect that a new day has arrived and then automatically assign a specific value to a specific table?

+5
source share
5 answers

Store in the database the time (date and time) when energy should be restored. Then each time the player registers whether this time has passed or not. If it is, restore energy.

+2
source

, , , "cron jobs" , .

+1

. / SQL OUTSIDE.

0
-1

All Articles