Query Error


Active member
Hi, I would like to get the email addresses of users from the table xf_user that in the table xf_user_field_value have the following values: field_id = "x118" and FIELD_VALUE = "1".

Obviously the id x118 I created myself and I need to get a purpose.

I tried this query but inserie error:

"SELECT u.email, uf.field_value FROM xf_user as u JOIN xf_user_field_value as uf = ON u.user_id uf.user_id uf.field_value = 1 WHERE AND uf.filed_id = 'x118'"

Fatal error: Method XenForo_Template_Public :: __toString () must not throw an exception in / home / xxxx / public_html / demo / xenForo / library / XenForo / Template / Abstract.php (265): eval () 'd code on line 0

what is the right query?
Last edited: