MySQL Forums
Forum List  »  General

Re: Concat Rows of SubQuery
Posted by: David Lage
Date: June 15, 2007 12:13PM

Yes this fixed it. I did not know of the new group_concat function.

SELECT (CONCAT('__TAG__',group_concat(page_tag.name SEPARATOR '__TAG__'), '__TAG__')) as tag_name FROM `page`
left join page_tag_album on (page_tag_album.page_id = page.id)
left join page_tag on (page_tag_album.id = page_tag.page_tag_album_id)
where page_tag_album.type = 'music' AND page_tag.status <> 'deleted' AND page.id = p.id
GROUP BY page_tag.page_tag_album_id
LIMIT 1

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
June 13, 2007 11:50AM
Re: Concat Rows of SubQuery
June 15, 2007 12:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.