diff --git a/database-update.sql b/database-update.sql index 8424e9b63..8cf00f472 100644 --- a/database-update.sql +++ b/database-update.sql @@ -7,3 +7,4 @@ DROP TABLE `cmpMemPool`; ALTER TABLE `mempools` CHANGE `mempool_used` `mempool_used` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_free` `mempool_free` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_total` `mempool_total` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_largestfree` `mempool_largestfree` BIGINT( 16 ) NULL DEFAULT NULL ,CHANGE `mempool_lowestfree` `mempool_lowestfree` BIGINT( 16 ) NULL DEFAULT NULL ; ALTER TABLE `ports` ADD `port_descr_type` VARCHAR( 32 ) NULL DEFAULT NULL AFTER `device_id` ,ADD `port_descr_descr` VARCHAR( 64 ) NULL DEFAULT NULL AFTER `port_descr_type` ,ADD `port_descr_circuit` VARCHAR( 64 ) NULL DEFAULT NULL AFTER `port_descr_descr` ,ADD `port_descr_speed` VARCHAR( 32 ) NULL DEFAULT NULL AFTER `port_descr_circuit` ,ADD `port_descr_notes` VARCHAR( 128 ) NULL DEFAULT NULL AFTER `port_descr_speed`; CREATE TABLE `frequency` ( `freq_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `freq_oid` varchar(64) NOT NULL, `freq_index` varchar(8) NOT NULL, `freq_type` varchar(32) NOT NULL, `freq_descr` varchar(32) NOT NULL default '', `freq_precision` int(11) NOT NULL default '1', `freq_current` float default NULL, `freq_limit` float default NULL, `freq_limit_low` float default NULL, PRIMARY KEY (`freq_id`), KEY `freq_host` (`device_id`)) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=latin1; +ALTER TABLE `temperature` CHANGE `temp_index` `temp_index` int(11) NOT NULL; diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 90919b082..deb860390 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -155,7 +155,7 @@ function discover_temperature(&$valid_temp, $device, $oid, $index, $type, $descr { $entry = mysql_fetch_array(mysql_query("SELECT * FROM `temperature` WHERE device_id = '".$device['device_id']."' AND `temp_type` = '$type' AND `temp_index` = '$index'")); echo(mysql_error()); - if($oid == $entry['temp_oid'] && $descr == $entry['temp_descr'] && $precision == $ntry['temp_precision']) + if($oid == $entry['temp_oid'] && $descr == $entry['temp_descr'] && $precision == $entry['temp_precision']) { echo("."); }