diff --git a/daily.php b/daily.php index 85f6b713bc..86ef356705 100644 --- a/daily.php +++ b/daily.php @@ -42,7 +42,7 @@ if ($options['f'] === 'rrd_purge') { if ($options['f'] === 'syslog') { if (is_numeric($config['syslog_purge'])) { - $rows = dbFetchRow('SELECT MIN(seq) FROM syslog'); + $rows = (int)dbFetchCell('SELECT MIN(seq) FROM syslog'); while (true) { $limit = dbFetchRow('SELECT seq FROM syslog WHERE seq >= ? ORDER BY seq LIMIT 1000,1', array($rows)); if (empty($limit)) { diff --git a/includes/callback.php b/includes/callback.php index 8d3657eb96..aa64a1477a 100644 --- a/includes/callback.php +++ b/includes/callback.php @@ -31,8 +31,7 @@ if ($enabled == 1) { 'bills' => 'SELECT COUNT(`bill_type`) AS `total`,`bill_type` FROM `bills` GROUP BY `bill_type`', 'cef' => 'SELECT COUNT(`device_id`) AS `total` FROM `cef_switching`', 'cisco_asa' => 'SELECT COUNT(`oid`) AS `total`,`oid` FROM `ciscoASA` WHERE `disabled` = 0 GROUP BY `oid`', - 'mempool' => 'SELECT COUNT(`cmpName`) AS `total`,`cmpName` FROM `cmpMemPool` GROUP BY `cmpName`', - 'current' => 'SELECT COUNT(`current_type`) AS `total`,`current_type` FROM `current` GROUP BY `current_type`', + 'mempool' => 'SELECT COUNT(`mempool_descr`) AS `total`,`mempool_descr` FROM `mempools` GROUP BY `mempool_descr`', 'dbschema' => 'SELECT COUNT(`version`) AS `total`, `version` FROM `dbSchema`', 'snmp_version' => 'SELECT COUNT(`snmpver`) AS `total`,`snmpver` FROM `devices` GROUP BY `snmpver`', 'os' => 'SELECT COUNT(`os`) AS `total`,`os` FROM `devices` GROUP BY `os`', diff --git a/includes/discovery/bgp-peers.inc.php b/includes/discovery/bgp-peers.inc.php index cc1903f534..8ac4d42f8e 100644 --- a/includes/discovery/bgp-peers.inc.php +++ b/includes/discovery/bgp-peers.inc.php @@ -201,7 +201,7 @@ if ($config['enable_bgp']) { $afi = $entry['afi']; $safi = $entry['safi']; if (!$af_list[$afi][$safi] || !$af_list[$entry['bgpPeerIdentifier']][$afi][$safi]) { - dbDelete('bgpPeers_cbgp', '`device_id` = ? AND `bgpPeerIdentifier` = ?, afi=?, safi=?', array($device['device_id'], $peer['ip'], $afi, $safi)); + dbDelete('bgpPeers_cbgp', '`device_id` = ? AND `bgpPeerIdentifier` = ? AND afi=? AND safi=?', array($device['device_id'], $peer['ip'], $afi, $safi)); } } }