Jump to content

sql and counting down times


kingb00zer
 Share

Recommended Posts

Hi I have a script that when run inserts data into a row in my sql database but what I want to follow that action, is a timer that countsdown 15 minutes from that record being inserted and if when that 15 minutes is up replace that row with the value "none" (which is what it was previous to the insertion.) I currently have a sister row that i insert the number 3 into when the script is run and evry 5 minutes that number is decremented until the sister row = 0 then the row changes back to "none", however that does not technically equal 15 minutes and I want to do something more precise. I just dont know what look up to study how to do this.

Link to comment
Share on other sites

Wait wait, so you already got a script running automatically every 5 minutes? Why can't you change that time to 15 minutes? I am confused.

Link to comment
Share on other sites

well lets say for instance a user runs this script at 3:22pm, at 3:25pm the number entered at first is decremented, at 3:30pm decremented again, then 3:35pm decremented again this only equals 13 minutes. And getting it to be an exact 15 minutes (exact to the minute not second) regardless of what time the script is run is where I have trouble. See what I want to do is abolish the current system I am using as it is inacurate to what I want it to do, it was just a temporary solution to test out the main parts to what makes this attack. My site is a game and the initial script is an attack which if succesful gives you 15 minutes to kill that person in order to gain a larger reward.

Edited by KingB00ZeR
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...