mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixed UPDATE queries in discovery for voltages,fans,toner
git-svn-id: http://www.observium.org/svn/observer/trunk@1067 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -195,7 +195,7 @@ function discover_fan($device, $oid, $index, $type, $descr, $precision = 1, $low
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr', `fan_oid` = '$oid', `fan_precision` = '$precision' WHERE `device_id` = '".$device['device_id']."' AND fan_type = '$type' AND `fan_index` = '$fan_index' ");
|
mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr', `fan_oid` = '$oid', `fan_precision` = '$precision' WHERE `device_id` = '".$device['device_id']."' AND fan_type = '$type' AND `fan_index` = '$index' ");
|
||||||
echo("U");
|
echo("U");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ function discover_volt($device, $oid, $index, $type, $descr, $precision = 1, $lo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mysql_query("UPDATE voltage SET `volt_descr` = '$descr', `volt_oid` = '$oid', `volt_precision` = '$precision' WHERE `device_id` = '$id' AND volt_type = '$type' AND `volt_index` = '$volt_index' ");
|
mysql_query("UPDATE voltage SET `volt_descr` = '$descr', `volt_oid` = '$oid', `volt_precision` = '$precision' WHERE `device_id` = '$id' AND volt_type = '$type' AND `volt_index` = '$index' ");
|
||||||
echo("U");
|
echo("U");
|
||||||
if($debug) { echo("$query ". mysql_affected_rows() . " updated"); }
|
if($debug) { echo("$query ". mysql_affected_rows() . " updated"); }
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ function discover_toner($device, $oid, $index, $type, $descr, $capacity = NULL,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mysql_query("UPDATE toner SET `toner_descr` = '$descr', `toner_oid` = '$oid', `toner_capacity` = '$capacity' WHERE `device_id` = '".$device['device_id']."' AND toner_type = '$type' AND `toner_index` = '$toner_index' ");
|
mysql_query("UPDATE toner SET `toner_descr` = '$descr', `toner_oid` = '$oid', `toner_capacity` = '$capacity' WHERE `device_id` = '".$device['device_id']."' AND toner_type = '$type' AND `toner_index` = '$index' ");
|
||||||
echo("U");
|
echo("U");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user