diff --git a/src/playlist/playlistbackend.cpp b/src/playlist/playlistbackend.cpp index 563d7810b..dc349d90e 100644 --- a/src/playlist/playlistbackend.cpp +++ b/src/playlist/playlistbackend.cpp @@ -178,16 +178,7 @@ QSqlQuery PlaylistBackend::GetPlaylistRows(int playlist) { QMutexLocker l(db_->Mutex()); QSqlDatabase db(db_->Connect()); - QString query = "SELECT songs.ROWID, " + Song::JoinSpec("songs") + - "," - " p.ROWID, " + - Song::JoinSpec("p") + - "," - " p.type" - " FROM playlist_items AS p" - " LEFT JOIN songs" - " ON p.collection_id = songs.ROWID" - " WHERE p.playlist = :playlist"; + QString query = "SELECT songs.ROWID, " + Song::JoinSpec("songs") + ", p.ROWID, " + Song::JoinSpec("p") + ", p.type FROM playlist_items AS p LEFT JOIN songs ON p.collection_id = songs.ROWID WHERE p.playlist = :playlist"; QSqlQuery q(db); // Forward iterations only may be faster q.setForwardOnly(true);