Hi All
For my sphinxsearch index, I'm trying to make a sql-request, that returns all nodes within a specific nodetype. It has to be in one request, and I can't use php - only sql. Untill now it has worked fine like this:
SELECT content_type_avisartikel.nid, content_type_avisartikel.field_brdtekst_value, content_type_avisartikel.field_underrubrik_value, content_type_avisartikel.field_ekstern_skribent_value, node.title, GROUP_CONCAT(profile_values.value SEPARATOR ' ' ),
UNIX_TIMESTAMP( field_avisdato_value ) AS avisdato
FROM `content_type_avisartikel`
JOIN `node` ON content_type_avisartikel.nid = node.nid
JOIN `content_field_skribent` ON content_field_skribent.nid = content_type_avisartikel.nid
LEFT JOIN `profile_values` ON content_field_skribent.field_skribent_uid = profile_values.uid
AND profile_values.fid =1
WHERE node.status = 1
GROUP BY content_type_avisartikel.nid
BUT, now I want to include the connected term from one and only one of my freetagging vocabularies, so I tried this:
SELECT content_type_avisartikel.nid, content_type_avisartikel.field_brdtekst_value,
content_type_avisartikel.field_underrubrik_value, content_type_avisartikel.field_ekstern_skribent_value, node.title, GROUP_CONCAT(profile_values.value SEPARATOR ' ' ), term_data.name,
UNIX_TIMESTAMP( field_avisdato_value ) AS avisdato