0

Is it possible to delete data from a specific custom member field in every member account in one operation (ie not going through every member account and deleting the data one at a time)?

0

Okay this should do it for you. First of all you need to find the ID number of the member field that you wish to clear. You can do this by going to

Members->Member Fields

In here you should see all your custom member fields and an ID (first column) for each. Note down the number of the field that you wish to clear the data from then run this query in

Tools->Data->SQL Manager->Database Query Form

or a SQL tool of your own choice if you prefer.

UPDATE exp_member_data SET m_field_id_1 = ""

Change the 1 in the query above to the number that you retrieved of your custom member field previously.

Hopefully that should do what you need here. Definitely backup your database first before doing this though as best practice.

| improve this answer | |
2

Could you not simply delete the custom member field? This would also delete the data from every member account.

| improve this answer | |
  • 1
    Of course that is obviously quicker ;-) Would mean recreating the field again after if you still wanted it there but yep definitely faster!! :-) – Mark Bowen Sep 8 '14 at 15:32
0

You could definitely do this performing a query directly upon the database although you'd want to make a backup of said database first just incase anything went awry. I'm not entirely sure if there's an add-on out there to do this sort of thing, I think there is although it would be doing the same sort of thing anyway and a direct query connection to the database would be faster.

Are you okay with performing queries directly upon your database? You would need some sort of MySQL admin panel or a MySQL client in order to do this.

What version of ExpressionEngine are you running?

| improve this answer | |
  • I accepted this answer - although I think I'm going to have to work out how to do it! The version is 2.5.3 – Andrew Sep 8 '14 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.