Daily Counter Problem
Posted: Sat Apr 14, 2007 11:43 am
Hey guys i need some help with a problem on a small script on my website and i have tryed to fix it many times and i have asked friends of mine who are more experienced and they say they have no idea what is wrong...
What the script is supposed to do is because i run an arcade website it calculates the ammount of game plays in that day, which it does fine until it gets to the timer reseting at the end of the day... the time just constantly adds up and never resets.
Can anyone else see the problem, any help is great fully received!
Thanks,
Palgie.
EDIT: Checked database info and its all correct...
What the script is supposed to do is because i run an arcade website it calculates the ammount of game plays in that day, which it does fine until it gets to the timer reseting at the end of the day... the time just constantly adds up and never resets.
Can anyone else see the problem, any help is great fully received!
Code: Select all
<?php
include "../cfg.php";
$db->query("UPDATE info
SET `integer`='0'
WHERE `name`='dayplays'");
$time = time()+60*60*24;
$db->query("DELETE FROM gameplays WHERE `time`<'.$time.'");
?>Palgie.
EDIT: Checked database info and its all correct...