hi, im trying to write a script that gets records from a gameserver (such as players on, how many kills they have, how long theyve been online etc.) this script will also save the players stats into a mysql database, adding kills and time onto the ammount already in it.
what i need help with is writing the time online into a db. the problem is the time format is minute:second. i tried to convert it into a number without the ':' using str_replace but it didnt work. it displays the time w/o a ':', but still writes the time to the db as minute:second. i want to convert this to something that can be added together.
here's what i've tried
for ($i=0; $i<=$count; $i++)
{
<?= $tarray[$i] ?> // time is split into an array called $tarray
<?
$tarray[$i] = str_replace(":", "", $tarray[$i]);
$q = "UPDATE rvs_server SET time=time + $tarray[$i] WHERE time='$tarray[$i]'";
$s = mysql_db_query($d,$q);