'%patch%panel%', 'Cable Management' => '%cable%manage%', 'Blanking Panel' => '%blank%', 'Shelf' => '%shelf%', ]; foreach ($rack_unit_type_guesses as $rack_unit_type => $rack_unit_pattern) { mysqli_query($mysqli, "UPDATE `rack_units` SET `unit_type` = '$rack_unit_type' WHERE `unit_type` IS NULL AND `unit_asset_id` IS NULL AND `unit_device` LIKE '$rack_unit_pattern' "); } mysqli_query($mysqli, "UPDATE `rack_units` SET `unit_type` = 'Device' WHERE `unit_type` IS NULL AND `unit_asset_id` IS NULL");