Re: Automatically +1 every 30 mins to a value in the database.
| From: | David Robley | Date: | Fri, 02 Jun 2006 11:14:25 +0000 |
| Subject: | Re: Automatically +1 every 30 mins to a value in the database. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41976@lists.php.net to get a copy of this message | ||
Alex Major wrote:
> Hi there.
> I've posted this up on both this list, and the mysql list as I'm not sure
> whether this is something that I'd need to do with the php or mysql.
>
> Basically, I am making an add-on to my small website which is a mini
> online game. Every user will have gold, and every 30mins I'd like their
> amount of gold to go up by 1 (or say a variable say $goldupdateamount).
>
> I'd like to know which would be the best way of doing this, and if there
> is a command in php which would achieve this.
>
> Regards,
> Alex.
Assuming you are on a *nix system, you could run a CLI script every $period
from cron; for Windows I think there is a task scheduler (or similar name)
that allows the same thing.
Cheers
--
David Robley
I tried to daydream, but my mind kept wandering.
Today is Pungenday, the 7th day of Confusion in the YOLD 3172.