Fixed SQL statement so things don't go broke.

This commit is contained in:
mchasteen
2015-02-26 23:03:28 +00:00
committed by laf
parent d47952f69e
commit 03ad4b7bc5
@@ -2,7 +2,7 @@
// FIXME - dbFacile and fewer SNMP_GETs
if (dbFetchCell("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = ? AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor'",array($device['device_id'])) == "0" && ($device['os_group'] == "cisco"))
if (dbFetchCell("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = ? AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')",array($device['device_id'])) == "0" && ($device['os_group'] == "cisco"))
{
echo("CISCO-ENVMON-MIB: ");
$oids = snmp_walk($device, ".1.3.6.1.4.1.9.9.13.1.3.1.2", "-Osqn", "CISCO-ENVMON-MIB");