update TME description

git-svn-id: http://www.observium.org/svn/observer/trunk@691 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans 2010-01-15 11:43:26 +00:00
parent b63782dce6
commit c3b3d5ee32

View File

@ -51,7 +51,12 @@
$query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_tenths`) values ('$id', '$temp_oid', '$descr',1)";
mysql_query($query);
echo("+");
} else { echo("."); }
} elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) {
echo("U");
mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'");
} else {
echo(".");
}
$temp_exists[] = "$id $temp_oid";
}
}