php - Update mysql data while not actually using it -


How can I set up a program in which a fixed piece of data is updated for the user every hour. One example I can give is the mafia war when you get the property, then your money increases the amount of money that it has the property. I do not want to get out of the code for me, but instead I am asking for the direction to direct me in the right direction. I tried searching for Crane Jobs, but it only runs a script at a set time. Different users are going to use it, and they may have different time to update their information. Thus, cron jobs are not applicable here.

A solution that I was thinking was how to implement such a thing that whenever the player Saves the current time, so the game saves. Then, when the player increases the game back up, it calculates how many minutes have passed and it tells how much money the player should pay to the player. Then, you can update the SQL database to reflect changes.

Comments