From: APTX Date: Sat, 13 Apr 2013 13:27:00 +0000 (+0200) Subject: Add ORDER BY to select the first unwatched ep, not just any unwatched ep... X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=51ce63368f7f8df3eb5d438b8524f81336a3f62f;p=localmylist.git Add ORDER BY to select the first unwatched ep, not just any unwatched ep... --- diff --git a/localmylist/database.cpp b/localmylist/database.cpp index 337678b..d8f2265 100644 --- a/localmylist/database.cpp +++ b/localmylist/database.cpp @@ -132,7 +132,8 @@ OpenFileData Database::firstUnwatchedByTitle(const QString &title) " LEFT JOIN file_location fl ON fl.fid = f.fid " " WHERE f.my_watched IS NULL " " AND lower(at.title) = lower(:title) " - " AND fl.path IS NOT NULL "); + " AND fl.path IS NOT NULL " + "ORDER BY epno ASC "); q.bindValue(":title", title); ofd = readOpenFileData(q);