fix: update GetRepliesWithFilledText to join Posts table and filter NotFound

This commit is contained in:
jim
2026-05-06 09:50:36 -05:00
parent 1507086269
commit 0adaef62b1
2 changed files with 4013 additions and 7 deletions
+8 -7
View File
@@ -868,13 +868,14 @@ namespace URLNotesGrabberCORE
{ {
connection.Open(); connection.Open();
string sql = @"SELECT DISTINCT Notes.RootBlogName as blogName, Notes.PostID, string sql = @"SELECT DISTINCT P.BlogName, P.PostID, MAX(N.timestamp) as LatestTimestamp
MAX(Notes.timestamp) as LatestTimestamp FROM Posts P
FROM Notes INNER JOIN Notes N ON N.PostID = P.PostID AND N.RootBlogName = P.BlogName
WHERE Notes.type = 'reply' WHERE P.NotFound = 0
AND (Notes.replyText IS NULL OR Notes.replyText = '' OR Notes.replyText = '.') AND N.type = 'reply'
GROUP BY Notes.RootBlogName, Notes.PostID AND (N.replyText IS NULL OR N.replyText = '' OR N.replyText = '.')
ORDER BY LatestTimestamp ASC"; GROUP BY P.BlogName, P.PostID
ORDER BY LatestTimestamp ASC";
if (limit.HasValue) if (limit.HasValue)
{ {
+4005
View File
File diff suppressed because one or more lines are too long