fix: update GetRepliesWithFilledText to join Posts table and filter NotFound
This commit is contained in:
@@ -868,12 +868,13 @@ 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 = '.')
|
||||||
|
GROUP BY P.BlogName, P.PostID
|
||||||
ORDER BY LatestTimestamp ASC";
|
ORDER BY LatestTimestamp ASC";
|
||||||
|
|
||||||
if (limit.HasValue)
|
if (limit.HasValue)
|
||||||
|
|||||||
+4005
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user