mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix db update for mac accounting (and enable spitting out sql query on error)
git-svn-id: http://www.observium.org/svn/observer/trunk@2386 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -122,7 +122,7 @@ function dbUpdate($data, $table, $where = null, $parameters = array()) {
|
||||
if(dbQuery($sql, $data)) {
|
||||
$return = mysql_affected_rows();
|
||||
} else {
|
||||
#echo("$fullSql");
|
||||
echo("$fullSql");
|
||||
trigger_error('QDB - Update failed.', E_USER_WARNING);
|
||||
$return = false;
|
||||
}
|
||||
|
@@ -85,7 +85,8 @@ foreach ($acc_rows as $acc)
|
||||
|
||||
if ($acc['update'])
|
||||
{ /// Do Updates
|
||||
dbUpdate($acc['update'], 'mac_accounting', 'WHERE `ma_id` = ?', array($acc['ma_id']));
|
||||
print_r($acc['update']);
|
||||
dbUpdate($acc['update'], 'mac_accounting', '`ma_id` = ?', array($acc['ma_id']));
|
||||
} /// End Updates
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user