Skip to content

Commit

Permalink
Fixed displaying of stats for Commented Stories #697
Browse files Browse the repository at this point in the history
  • Loading branch information
eSilverStrike committed Oct 27, 2016
1 parent 6d714dd commit a8f36b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public_html/stats.php
Expand Up @@ -180,7 +180,9 @@
$sql = "SELECT sid,title,comments
FROM {$_TABLES['stories']}, {$_TABLES['topic_assignments']} ta
WHERE ta.type = 'article' AND ta.id = sid
AND (draft_flag = 0) AND (date <= NOW()) AND (comments > 0)" . COM_getPermSQL('AND') . $topicsql . " ORDER BY comments DESC LIMIT 10";
AND (draft_flag = 0) AND (date <= NOW()) AND (comments > 0)" . COM_getPermSQL('AND') . $topicsql
. " GROUP BY sid, title, comments "
. " ORDER BY comments DESC LIMIT 10";

$result = DB_query($sql);
$nrows = DB_numRows($result);
Expand Down

0 comments on commit a8f36b7

Please sign in to comment.