$mac ($oid) -> $ip"); if (dbFetchCell("SELECT COUNT(*) from mac_accounting WHERE port_id = ? AND mac = ?",array($interface['port_id'], $clean_mac))) { #$sql = "UPDATE `mac_accounting` SET `mac` = '$clean_mac' WHERE port_id = '".$interface['port_id']."' AND `mac` = '$clean_mac'"; #mysql_query($sql); #if (mysql_affected_rows()) { echo(" UPDATED!"); } #echo($sql); echo("."); } else { #echo(" Not Exists!"); dbInsert(array('port_id' => $interface['port_id'], 'mac' => $clean_mac), 'mac_accounting'); echo("+"); } #echo("\n"); } } echo("\n"); } # os_group=cisco // FIXME - NEEDS TO REMOVE STALE ENTRIES?? :O ?>