List:General Discussion« Previous MessageNext Message »
From:Miles Thompson Date:June 2 2006 11:53am
Subject:Re: Automatically add +1 every 30mins
View as plain text  
At 07:58 AM 6/2/2006, Alex Major wrote:

>Hi there.
>I've posted this up on both this list, and the php 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 mysql which would achieve this.
>
>Regards,
>Alex.

I don't know about MySQL, but for PHP you would have to run it as a cron 
(or similar OS service) to trigger a script to do the update.
If you have access to the server, this could be any language which can work 
with MySQL: Perl, Java, VB, C .... ? Or run JavaScript on the player's page?

  As for MySQL, I do not believe it has a built-in timer, except for 
synchronization or replication.

Miles Thompson 


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.8.1/354 - Release Date: 6/1/2006


Thread
Automatically add +1 every 30minsAlex Major2 Jun
  • Re: Automatically add +1 every 30minsMiles Thompson2 Jun
  • Re: Automatically add +1 every 30minsDan Buettner2 Jun
    • Re: Automatically add +1 every 30minsMiles Thompson2 Jun
      • Re: Automatically add +1 every 30minsDouglas Sims2 Jun
        • Uninstall old versionnngau2 Jun
          • Re: Uninstall old versionDan Buettner2 Jun
        • RE: Automatically add +1 every 30minsDaevid Vincent4 Jun