Krentenbol
12-04-2011, 09:45 AM
I've been trying around a lot, but I just couldn't figure out how to put the variable into a row. I must forget something...
Code atm:
<?php
include('inc/open.php');
$id = $_GET['id'];
$query = mysql_query("SELECT * FROM status") or die (mysql_error());
while($row = mysql_fetch_assoc($query)){
$uptime_calc = $row['checks'] - $row['down'];
$uptime = round ($uptime_calc/$row['checks']*100,0);
echo $uptime;
echo "<br />";
}
?>
I want $uptime in table status, column uptime.
Code atm:
<?php
include('inc/open.php');
$id = $_GET['id'];
$query = mysql_query("SELECT * FROM status") or die (mysql_error());
while($row = mysql_fetch_assoc($query)){
$uptime_calc = $row['checks'] - $row['down'];
$uptime = round ($uptime_calc/$row['checks']*100,0);
echo $uptime;
echo "<br />";
}
?>
I want $uptime in table status, column uptime.