Time/Update database
Posted: Sun Dec 05, 2004 3:00 pm
Ive been working on this code for every 30 minutes it adds, lets say 100 points, to a persons total. I dont even know where to get started. Do I try something like:
if ( $time == 00:00,00:30,01:00...and so on)
{
$result = UPDATE BoC SET points=points+$points WHERE username=$username
$gamer = mysql_query($result) or die("Query failed : " . mysql_error());
}
$points = points+100
Except Id actually look at some code instead of typing this just off of my head. So is that even close or am I way off?
if ( $time == 00:00,00:30,01:00...and so on)
{
$result = UPDATE BoC SET points=points+$points WHERE username=$username
$gamer = mysql_query($result) or die("Query failed : " . mysql_error());
}
$points = points+100
Except Id actually look at some code instead of typing this just off of my head. So is that even close or am I way off?