fix: update GetRepliesWithFilledText to join Posts table and filter NotFound
This commit is contained in:
@@ -868,13 +868,14 @@ namespace URLNotesGrabberCORE
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
string sql = @"SELECT DISTINCT Notes.RootBlogName as blogName, Notes.PostID,
|
||||
MAX(Notes.timestamp) as LatestTimestamp
|
||||
FROM Notes
|
||||
WHERE Notes.type = 'reply'
|
||||
AND (Notes.replyText IS NULL OR Notes.replyText = '' OR Notes.replyText = '.')
|
||||
GROUP BY Notes.RootBlogName, Notes.PostID
|
||||
ORDER BY LatestTimestamp ASC";
|
||||
string sql = @"SELECT DISTINCT P.BlogName, P.PostID, MAX(N.timestamp) as LatestTimestamp
|
||||
FROM Posts P
|
||||
INNER JOIN Notes N ON N.PostID = P.PostID AND N.RootBlogName = P.BlogName
|
||||
WHERE P.NotFound = 0
|
||||
AND N.type = 'reply'
|
||||
AND (N.replyText IS NULL OR N.replyText = '' OR N.replyText = '.')
|
||||
GROUP BY P.BlogName, P.PostID
|
||||
ORDER BY LatestTimestamp ASC";
|
||||
|
||||
if (limit.HasValue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user