mysql: get all rows into 1 column

Posted by andufo on Stack Overflow See other posts from Stack Overflow or by andufo
Published on 2010-05-28T18:26:20Z Indexed on 2010/05/28 18:32 UTC
Read the original article Hit count: 231

Filed under:
|
|

hi, i have 3 tables:

  • post (id_post, title)
  • tag (id_tag, name)
  • post_tag (id_post_tag, id_post, id_tag)

Lets suppose that id_post 3 has 4 linked tags 1,2,3,4 (soccer, basket, tennis and golf).

Is there a way to return something like this in ONE row?

  • col 1 id_post = 3
  • col 2 tags = soccer basket tennis golf

Thanks

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql