From caa5d5e4a0ddae2c17f1e1ac0561f015c6dfdaa6 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sat, 17 Apr 2010 19:35:48 +0000 Subject: [PATCH] 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 --- includes/discovery/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 9a4e9dfad9..484f1bc3a6 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -195,7 +195,7 @@ function discover_fan($device, $oid, $index, $type, $descr, $precision = 1, $low } 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"); } } @@ -230,7 +230,7 @@ function discover_volt($device, $oid, $index, $type, $descr, $precision = 1, $lo } 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"); if($debug) { echo("$query ". mysql_affected_rows() . " updated"); } } @@ -261,7 +261,7 @@ function discover_toner($device, $oid, $index, $type, $descr, $capacity = NULL, } 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"); } }