I've been driving myself a little mad trying to figure this out and I can't find anything in the search (perhaps I'm not searching the right thing); so I wonder if those well-versed in this stuff can help me.
Is there a way to alphabetise the artists field? I currently have them stored with ";" separators.
e.g.: "Bomb the Bass; Sinéad O'Connor; Benjamin Zephaniah".
But I would want to be able to alphabetise that field, so it would appear:
"Benjamin Zephaniah; Bomb The Bass; Sineád O'Connor".
The closest I managed to find here was:
Code: Select all
SQLQuery("SELECT group_concat(AA, '; ') FROM (SELECT DISTINCT Artists.Artist AS AA FROM Songs INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong AND (ArtistsSongs.PersonType = 1 OR ArtistsSongs.PersonType IS NULL) INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE IDAlbum = " & oSongData.Album.ID & ")")
- But that gets ALL of the artist values for the ENTIRE album the track is on, rather than just that one track on its own and nothing I seem to change will make it just fetch the artists for that ONE song, rather than ALL the artists featured on the album for which the song appears.
Many thanks,
cokehearth
I've been driving myself a little mad trying to figure this out and I can't find anything in the search (perhaps I'm not searching the right thing); so I wonder if those well-versed in this stuff can help me.
Is there a way to alphabetise the artists field? I currently have them stored with ";" separators.
e.g.: "Bomb the Bass; Sinéad O'Connor; Benjamin Zephaniah".
But I would want to be able to alphabetise that field, so it would appear:
"Benjamin Zephaniah; Bomb The Bass; Sineád O'Connor".
The closest I managed to find here was:
[code]SQLQuery("SELECT group_concat(AA, '; ') FROM (SELECT DISTINCT Artists.Artist AS AA FROM Songs INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong AND (ArtistsSongs.PersonType = 1 OR ArtistsSongs.PersonType IS NULL) INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE IDAlbum = " & oSongData.Album.ID & ")")[/code]
- But that gets ALL of the artist values for the ENTIRE album the track is on, rather than just that one track on its own and nothing I seem to change will make it just fetch the artists for that ONE song, rather than ALL the artists featured on the album for which the song appears.
Many thanks,
cokehearth