That 6-in-one is probably old data, but regardless, it's certainly not useful data -- those really should be represented as separate entries, possibly up to 11 of them, depending on how you want to break it apart. If there are a small number of these to fix, I'd suggest using the "Log In As" or "Edit User" features to fix these up using the user interface rather than working with the database directly. (Poorly entered data like this will benefit from a clean set of interests already in the database, as they'll see short, relevant suggestions come up before they finish entering the long, less-than-useful ones.)
For deleting old entries, there are 3 tables you'll need to clean data out of: controlled_vocab_entries, controlled_vocab_entry_settings, and user_interests. To do that by interest name, you can use the query:
- Code: Select all
DELETE ui, cve, cves FROM user_interests ui, controlled_vocab_entries cve, controlled_vocab_entry_settings cves, controlled_vocabs cv WHERE cv.symbolic='interest' AND cve.controlled_vocab_id = cv.controlled_vocab_id AND cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id AND ui.controlled_vocab_entry_id=cve.controlled_vocab_entry_id AND cves.setting_name='interest' AND cves.setting_value='Interest to remove';
...where "Interest to remove" is replaced as needed.
Public Knowledge Project Team