Reem
Reem

Reputation: 59

Database fields names for custom fields in CiviCRM

I created new contact type 'client', and created custom fields for client type like 'Ethnicity'. I can now add records. I need to create reports, for example the total number of clients with a certain Ethnicity. The question is how can I know the database table and fields names? I looked in wp-content->civicrm->civicrm->sql but found the basic tables only.

Upvotes: 0

Views: 222

Answers (1)

petednz - fuzion
petednz - fuzion

Reputation: 185

When you create a new set/group of fields there will be a new entry in the civicrm_custom_group table. The fields themselves are in civicrm_custom_field table.

The data for the fields is stored in civicrm_value__ so eg civicrm_value_client_fields_12

you may get better responses in http://civicrm.stackexchange.com/questions?sort=active

Upvotes: 1

Related Questions