Survival Time - quick question

The number in the survivor table, specifically the survival_time column, is the number of minutes the player has been alive, correct? I have a downloaded script and my own, and one of them is doing something wrong, so just want to clarify. Thanks!
 
i think that row was on mins, but i didnt know if its true, there is a php conversion who i use

PHP:
$enlace = mysql_connect("$ip", "$user", "$pass") or die("Could not connect: " . mysql_error());
mysql_select_db("$name") or die(mysql_error());
 
if($type == '1'){
$result = mysql_query("SELECT player_data.playerName, character_data.* FROM `player_data`, `character_data` WHERE player_data.playerUID = character_data.playerUID AND alive = 1 ORDER BY duration desc") or die(mysql_error());
echo "<table border=0>";
$sum1=0;
while($row = mysql_fetch_array( $result )) {
        $name = $row['playerName'];
        $duration = $row['duration'];
        $hours = floor($duration/60);
        $invhours = str_pad($hours, 2, '0', STR_PAD_LEFT);
        $minutes = $duration%60;
        $invmin = str_pad($minutes, 2, '0', STR_PAD_LEFT);
        if ($sum1<$top) {
        echo "<tr><th style='float:left; width:115px; text-align:right;'>$name</th><th style='float:left; margin:0 0 0 20px;'>$invhours:$invmin</th></tr>";
        $sum1++;
        }
    }
}
else {
echo "<center>Please config the variable $type. Make it <b>1</b> for Top Status</center>";
}
echo "</table>";
?>

u will need to add and define this vars
$ip(mysql_server)
$user(mysql_user)
$pass(mysql_password)
$name(database_name)
$top(max result to show)
 
Looking at your script it is treating the number in that field as minutes:

PHP:
$duration = $row['duration'];
$hours = floor($duration/60);

So yes that answers my question. I already wrote my own php script for this and just treated it as minutes which works fine. Thanks for clarification with your input.
 
Back
Top