I have a test db with test data.
Does anybody know the sql query that will create a new member field?
this is so i can quickly setup dummy data
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
October 18, 2011 10:37am
Subscribe [2]#1 / Oct 18, 2011 10:37am
I have a test db with test data.
Does anybody know the sql query that will create a new member field?
this is so i can quickly setup dummy data
#2 / Oct 18, 2011 7:39pm
Create fields based of what? Column values in your test db?
How many possible values/fields and…why not just use CP to make a few fields?
Look into ‘exp_member_fields’ table.
#3 / Oct 18, 2011 8:10pm
i want to create a member field. not sure how i can say that more clearly.
i want to create 1 to n fields - it really doesn’t matter
Sure using the cp to do this is fine - if its only a few - but given its a test db and will by its nature be wiped frequently I would like to create fields via a script.
what i guess i am asking is - is there just one table to update or does the process require a few tables being changed to achieve a custom field
cheers
tony
#4 / Oct 18, 2011 8:33pm
AFAIK
- to define custom fields just add vales in ‘exp_member_fields’ table.
- to populate those fields with data related to a member…look into ‘exp_member_data’ table.
So 2 tables are involved, just not sure if you can do mass creation of accounts due to how passwords are stored. Might be easier to do a manual creation of accounts first them then just do an sql dump of 2 tables for later.
Hope this gives enough direction…I have not tried this.