Combining two SELECT results

Hi guys!

Sorry if this has been asked before, but I don’t even know how to express the question succinctly enough to even search for what I’m struggling with.

I have one table containing bookmark data, while the other table contains tag data.

I need to grab the bookmark (singular), while at the same time grabbing all of the tags (plural) for that bookmark, and have them returned as one combined record.

Each row in the tag table contains the ID of the bookmark to which it relates.

I’m guessing this is entirely achievable, yes?

Nope. If you have 1 bookmark containing more tags, you can get the data exactly that way. It’s up to your language that you use how it formats the result.

Have you an attempt to show us, which can help us to understand what you need or are trying?

bazz

you betcha :slight_smile:

use a join query, with a GROUP BY clause on the bookmark id, and a GROUP_CONCAT function in the SELECT clause to concatenate all the tags for that bookmark into a single value

Excellent, that worked a treat!

However, I’ve inadvertently created another problem elsewhere, which killed MySQL!

I think I’ll need to post that as a separate question in a thread of its own.

Thanks!