fix previous commit :)

git-svn-id: http://www.observium.org/svn/observer/trunk@2759 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-12-06 22:26:47 +00:00
parent a1e96f708f
commit 70f51cef04
5 changed files with 15 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ foreach (dbFetchRows("SELECT * FROM `bills` ORDER BY `bill_name`") as $bill)
$datefrom = $day_data['0'];
$dateto = $day_data['1'];
$check = dbFetchRow("SELECT * FROM `bill_hist` WHERE bill_id = ? AND bill_datefrom = ? AND bill_dateto = ? LIMIT 1", array($bill['bill_id'], $datefrom, $dateto));
$check = dbFetchRow("SELECT * FROM `bill_history` WHERE bill_id = ? AND bill_datefrom = ? AND bill_dateto = ? LIMIT 1", array($bill['bill_id'], $datefrom, $dateto));
$period = getPeriod($bill['bill_id'],$datefrom,$dateto);
@@ -90,7 +90,7 @@ foreach (dbFetchRows("SELECT * FROM `bills` ORDER BY `bill_name`") as $bill)
'bill_percent' => $percent,
'updated' => array('NOW()'));
dbUpdate($update, 'bill_hist', '`bill_hist_id` = ?', array($bill['bill_id']));
dbUpdate($update, 'bill_history', '`bill_hist_id` = ?', array($bill['bill_id']));
echo(" Updated history! ");
} else {
@@ -115,7 +115,7 @@ foreach (dbFetchRows("SELECT * FROM `bills` ORDER BY `bill_name`") as $bill)
'bill_dateto' => $dateto,
'bill_id' => $bill['bill_id'] );
# print_r($update);
dbInsert($update, 'bill_hist');
dbInsert($update, 'bill_history');
echo(" Generated history! ");
}
echo("\n\n");