fix voltage limits

git-svn-id: http://www.observium.org/svn/observer/trunk@871 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-16 01:42:39 +00:00
parent cc5be54b71
commit 3d00309d03
2 changed files with 9 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ function discover_volt($device, $oid, $index, $type, $descr, $precision = 1, $lo
if (mysql_result(mysql_query("SELECT count(volt_id) FROM `voltage` WHERE device_id = '".$device['device_id']."' AND volt_type = '$type' AND `volt_index` = '$index'"),0) == '0')
{
$query = "INSERT INTO voltage (`device_id`, `volt_oid`, `volt_index`, `volt_type`, `volt_descr`, `volt_precision`, `volt_limit`, `volt_limit_low`, `volt_current`) ";
$query .= " VALUES ('".$device['device_id']."', '$oid', '$index', '$type', '$descr', '$precision', '$low_limit', '$volt_limit_low', '$current')";
$query .= " VALUES ('".$device['device_id']."', '$oid', '$index', '$type', '$descr', '$precision', '$high_limit', '$low_limit', '$current')";
mysql_query($query);
if($debug) { echo("$query ". mysql_affected_rows() . " inserted"); }
echo("+");