forbes — 2011-01-15T16:51:14-05:00 — #1
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?
furicane — 2011-01-15T17:14:40-05:00 — #2
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.
ibazz — 2011-01-15T17:29:22-05:00 — #3
Have you an attempt to show us, which can help us to understand what you need or are trying?
r937 — 2011-01-15T21:55:06-05:00 — #4
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
forbes — 2011-01-16T06:41:34-05:00 — #5
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.