What table stores the custom fields?
Can I get a simple select statement to generate a list of users along with the custom field entries?
Thanks
What table stores the custom fields?
Can I get a simple select statement to generate a list of users along with the custom field entries?
Thanks
If you’re using MySQL rather than MariaDB, the syntax is nice and readable, for example:
SELECT gibbonPerson.fields->>‘$.“0001”’ as ‘Custom Field’ FROM gibbonPerson;`
Where 0001 is the database ID of the custom field (which you can see in the URL parameters when editing a custom field). If you use MariaDB, for some reason it doesn’t support the shorter syntax, but you can use a longer one:
SELECT JSON_UNQUOTE(JSON_EXTRACT(gibbonPerson.fields, ‘$.0001’)) as ‘Custom Field’ FROM gibbonPerson;`
This worked. Thanks Sandra.
I must have MariaDB even though Home > System Admin > System Overview says I have
MySQL Version 10.4.20
I checked the database.and gibbonPerson.fields is being populated with the Custom User fields but not the Custom Staff fields
=========================
The fields are stored in the table they relate to, so User fields are in gibbonPerson, staff fields are in gibbonStaff, medical fields are in gibbonPersonMedical, etc.