Click to See Complete Forum and Search --> : MySql trigger-like functionality


AdamGundry
04-09-2003, 12:37 PM
Hi everyone

I am developing a multiplayer empire management web game using PHP and MySql. For this, I intended to have players gain turns every five minutes or so, which would seem to necessitate using a database trigger.

However, it turns out MySql does not support triggers. Does anyone know a way I could emulate this functionality (i.e. adding to a field for each record in a database once every 5 minutes)? How much lag would this cause?

Unfortunately, I am not running my own host so I do not have access to any other technologies, though Perl might be available.

Any ideas? Or do I have to rethink the game design?

Adam

SeGamysa
04-09-2003, 02:12 PM
maybe a timestamp and then a check to see if the time stamp is 5 min more since last move?

AdamGundry
04-10-2003, 01:40 PM
I guess this would work. I'll try it. Is this likely to significantly increase the loading time of each page? How fast does PHP/MySql handle queries of this sort?

Thanks for your help! :cool:

Adam