XF 1.4 How can I extract certain information from the database?

MarkMark

Member
As part of the sign-up process, I ask users to briefly explain why they are joining.

Is it possible through some sort of SQL Query to extract this and only this information from the database, in a format that would be relatively readable and not just some huge string of text?

I'm broadly aware of SQL statements, although have never used them. Presumably I just need to do something like:

SELECT MyColumn FROM MyTable

My userfield is called "referral", so how is this referenced in the database? Equally, what is the table name I need to use?

Sorry, I appreaciate this is basic stuff, but I've never played around with MySQL beyond setting up databases for scripts to use.
 
If it's a custom user field, you can extract it using:
Code:
SELECT * FROM xf_user_field_value where field_id = unhex('value')

You need to replace value with the actual value, which you can get from xf_user_field.field_id.
 
Back
Top Bottom