SELECT * ,
GROUP_CONCAT(DISTINCT language.language SEPARATOR ', ') AS Sprachen
FROM item_all_language
LEFT JOIN item ON itemitem_identity = item.item_identity
LEFT JOIN language ON languagelanguage_identity = language.language_identity
GROUP BY item.titel;


SELECT * , GROUP_CONCAT(CONCAT( author.surname, " ",author.first_name)
SEPARATOR ', ')
AS Authors
FROM item_all_author
LEFT JOIN item ON itemitem_identity = item.item_identity
LEFT JOIN author ON authorauthor_identity = author.author_identity
WHERE item.titel LIKE '%Sommer%' GROUP BY item.titel;


Hi, the two joins above work as expected, but i would like to combine them to 
one...
this query:

SELECT * FROM item
LEFT JOIN item_all_author ON item.item_identity =
item_all_author.itemitem_identity
LEFT JOIN author ON item_all_author.authorauthor_identity =
author.author_identity
LEFT JOIN item_all_language ON item.item_identity =
item_all_language.itemitem_identity
LEFT JOIN language ON item_all_language.languagelanguage_identity =
language.language_identity

works but returns the same id, titel, description again if there are more then 
one author or language or both, but i don't know howto use GROUP_CONCAT for 
this query...any ideas?
the db in question: home.pages.at/metalfan




Julius


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to