I have the following query:
SELECT TrackID, Name, Artist, Album, TotalTime, TrackNumber, TrackCount
FROM tracks
WHERE TrackID IN (SELECT Tracks FROM playlists
WHERE ID='f8ad830c-e2d6-11e1-99d7-00132094'
LIMIT 1)
ORDER BY Artist, Album, TrackNumber
Executing that returns the first row from the 'tracks' table to contain any of the results returned from the subquery. As of now, the Subquery returns:
41646,41696,41698,41700,41702,41704,41706,41708,41710,41712
When I put the above value returned from the subquery into the original query, in place of the subquery, it returns all the rows I would expect.
Why does the subquery limit the results returned to the first result, but replacing the subquery with the result returned (when ran in PHPMyAdmin) returns all of them?