Talk:PlaylistSongs table
Jump to navigation
Jump to search
I believe the descriptions for IDSong and IDPlaylistSong have been swapped in this documentation.
This query gives the expected result of listing all songs on playlist #22 in order last played:
SELECT ID, Artist, SongTitle, LastTimePlayed
FROM Songs
JOIN PlaylistSongs
ON Songs.ID=PlaylistSongs.IDSong
WHERE PlaylistSongs.IDPLaylist=22
ORDER BY LastTimePlayed
Whereas this query returns no rows:
SELECT ID, Artist, SongTitle, LastTimePlayed
FROM Songs
JOIN PlaylistSongs
ON Songs.ID=PlaylistSongs.IDPlaylistSong
WHERE PlaylistSongs.IDPLaylist=22 ORDER BY LastTimePlayed
Fixed, thanks!