Hi,
Not sure if this is possible.
Let's say I have a query which returns the following data:
As you can see, the last two rows are the same song, with different 'credits'.
Is it possible in MySQL to somehow group by lyric_id, and create a new field that would have all the 'credits' in it for that song, rather than returning 2 rows for the same song?
The above dataset has been picked up from 3 tables:
Using this query:
Hope that makes sense. Please let me know if it doesn't.
Cheers.
Not sure if this is possible.
Let's say I have a query which returns the following data:
| Code: |
|
credit lyric_id artist_id lyric_title artist_name lyric 855 51 Love Of My Life Queen lyric 1573 51 My Fairy King Queen lyric 1623 51 My Melancholy Blues Queen lyric 853 51 Seaside Rendezvous Queen music 1579 51 Seven Seas of Rhye... Queen lyric 1579 51 Seven Seas of Rhye... Queen |
As you can see, the last two rows are the same song, with different 'credits'.
Is it possible in MySQL to somehow group by lyric_id, and create a new field that would have all the 'credits' in it for that song, rather than returning 2 rows for the same song?
The above dataset has been picked up from 3 tables:
| Code: |
|
Table: LYRIC_CREDITS Fields: lyric_id, link_id, credit Table: LYRIC Fields: lyric_id, lyric_title, artist_id Table: ARTIST Fields: artist_id, artist_name |
Using this query:
| Code: |
|
SELECT credit, lyric_credits.lyric_id, lyric.artist_id, lyric_title, artist_name FROM lyric_credits INNER JOIN lyric ON lyric.lyric_id = lyric_credits.lyric_id INNER JOIN artist ON artist.artist_id = lyric.artist_id WHERE link_id =18 ORDER BY artist_name, lyric_title |
Hope that makes sense. Please let me know if it doesn't.
Cheers.
