1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Bugtracker #5233 - be selective on DB query

This commit is contained in:
e107steved
2011-11-18 22:06:30 +00:00
parent d03cf071e7
commit 14ba16c819

View File

@@ -2503,7 +2503,9 @@ class admin_newspost
$qry = "SELECT $qry = "SELECT
COUNT(`comment_id`) AS c_count, COUNT(`comment_id`) AS c_count,
`news_id`, `news_comment_total`, `news_allow_comments` `news_id`, `news_comment_total`, `news_allow_comments`
FROM `#news` LEFT JOIN `#comments` ON `news_id`=`comment_item_id` GROUP BY `comment_item_id`"; FROM `#news` LEFT JOIN `#comments` ON `news_id`=`comment_item_id`
WHERE (`comment_type`='0') OR (`comment_type`='news')
GROUP BY `comment_item_id`";
$deleteCount = 0; $deleteCount = 0;
$updateCount = 0; $updateCount = 0;
@@ -2528,7 +2530,7 @@ class admin_newspost
} }
else else
{ {
$this->show_message(LAN_NEWS_62, E_MESSAGE_SUCCESS); $this->show_message(LAN_NEWS_62, E_MESSAGE_WARNING);
} }
} }