The fix will be in our next release. It's caused by having bad data in some of the tables. The system_id in the table is set to an id that doesn't exist in the system table. Any supported customers that have reported this have received a fix or direct help from me (as in a screen sharing session where I have fixed it for them). We give great support but you can understand we can't do this for free. That's a benefit of being a supported customer
If you're not a supported customer and not willing to become one and your database has bad data, I'm afraid you'll need to wait until the next release. Apologies.
Now having said that, I'll post the fix / code patch here but leave it to you to work it out for yourself.
[code] $tables = array('audit_log', 'bios', 'change_log', 'disk', 'dns', 'graph', 'ip', 'log', 'memory', 'module', 'monitor', 'motherboard', 'netstat', 'network', 'oa_group_sys', 'optical', 'pagefile', 'partition', 'print_queue', 'processor', 'route', 'san', 'scsi', 'server', 'server_item', 'service', 'share', 'software', 'software_key', 'sound', 'sys_man_additional_fields_data', 'sys_man_attachment', 'sys_man_notes', 'task', 'user', 'user_group', 'variable', 'video', 'vm', 'warranty', 'windows');
foreach ($tables as $table) {
if ($this->db->field_exists('system_id', $table)) {
$sql[] = "DELETE FROM `" . $table . "` WHERE `" . $table . "`.`system_id` NOT IN (SELECT system.id FROM system)";
}
}[/code]