Don't include deleted comments in counter.

This commit is contained in:
flash 2018-10-14 20:11:27 +02:00
parent 9737659317
commit f630d3d91b

View file

@ -229,6 +229,7 @@ function news_posts_get(
SELECT COUNT(`comment_id`) SELECT COUNT(`comment_id`)
FROM `msz_comments_posts` FROM `msz_comments_posts`
WHERE `category_id` = `comment_section_id` WHERE `category_id` = `comment_section_id`
AND `comment_deleted` IS NULL
) as `post_comments` ) as `post_comments`
FROM `msz_news_posts` as p FROM `msz_news_posts` as p
LEFT JOIN `msz_news_categories` as c LEFT JOIN `msz_news_categories` as c