Hi, I’m trying to build a module that exports all the members data including custom member fields as a csv file. I would like the field title row to reflect the actual field name, not ‘m_field_id_22’ but rather map the field name ‘m_field_name’ from the ‘exp_memer_fields’ table to the corresponding field in the ‘exp_member_data’ table.
As you can tell this is quite a complicated query and array to asemble given the abstracted nature of expression engine database fields.
I am wondering if there is an inbuilt expression engine model that I could tap into to construct this query to help build the correct array for output in CSV formatting?
Does anyone have any ideas about how best to construct this query?