some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice

git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-04-06 13:54:50 +00:00
parent 51e242b896
commit f55a30f744
163 changed files with 476 additions and 460 deletions

View File

@@ -58,7 +58,7 @@ $rate_95th = $rate_data['rate_95th'] * 1000;
$rate_average = $rate_data['rate_average'] * 1000;
$bi_q = mysql_query("SELECT * FROM bills WHERE bill_id = $bill_id");
$bi_a = mysql_fetch_array($bi_q);
$bi_a = mysql_fetch_assoc($bi_q);
$bill_name = $bi_a['bill_name'];
$countsql = mysql_query("SELECT count(`delta`) FROM `bill_data` WHERE `bill_id` = '$bill_id' AND `timestamp` >= '$datefrom' AND `timestamp` <= '$dateto'");
@@ -84,7 +84,7 @@ $dur = $end - $start;
$sql = "SELECT *, UNIX_TIMESTAMP(timestamp) AS formatted_date FROM bill_data WHERE bill_id = $bill_id AND timestamp >= $datefrom AND timestamp <= $dateto ORDER BY timestamp ASC";
$data = mysql_query($sql);
while ($row = mysql_fetch_array($data))
while ($row = mysql_fetch_assoc($data))
{
@$timestamp = $row['formatted_date'];
if (!$first) { $first = $timestamp; }