Bulk edits og member fields

Discussion in 'Installation' started by bennyuk1, Dec 13, 2017.

  1. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    I'm trying to add a checkbox field to users profiles and mark most of them (not all ) as "checked".
    Is there a way to do this in bulk? via SQL perhaps?
    Thanks
    Ben
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello Ben,

    Please check that your field has [SQL] type
    aMember CP -> Configuration -> Add User Fields

    In event of it has [DATA] type then edit field and switch it to [SQL].

    Then you can update all records with direct SQL query. You can use phpmyadmin too (usually available in all hostng control panels) to execute this query:
    Code:
    UPDATE am_user SET fieldname='fieldvalue';
    Best Regards.
  3. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    1. thanks, does this work on new fields that havent been set or edited by users?
    2. Is there a way to set a checkbox as ticked by default when creating it?
    Thanks
    Ben
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    1. it works for any field and user

    2. No

Share This Page