SQL Error: SELECT DISTINCT v.value as id,utd.value FROM site_catalog_fields as f INNER JOIN site_catalog_fieldvalues as v on f.id=v.field_id INNER JOIN site_usertables_data as utd on v.value=utd.id and utd.table_id=1 WHERE f.page_id=121 and f.func=2