Ashoar Posted August 28, 2008 Share Posted August 28, 2008 I am having a little bit of trouble that i am hoping someone can help me out with. Ok i have a script that is connected too MYSQL. The funtion of it is basicly that every 60 minutes 1 attack turn is added on too a users profile. This is so that they can attack another player in the game. The only problem is that when logged in it is supposed too say: "Next attack turn in (however many minutes) Instead i get: "Next attack turn in 0 minutes" The time system does not seem too work, even if i wait 60 minutes another turn is not added to the users profile. This is what i have on the MYSQL database for the time: `time` int(11) NOT NULL default '0', and in all the php pages that need it i use: $time=time()-$conf["minutes_per_turn"]*60; Can anyone help? Thanks So can anyone help me with my problem? Link to comment https://forums.phpfreaks.com/topic/121689-time/ Share on other sites More sharing options...
PHPTOM Posted August 28, 2008 Share Posted August 28, 2008 If you want to do something on an hourly basis why not use crons? Link to comment https://forums.phpfreaks.com/topic/121689-time/#findComment-627927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.