Commit 853141a9 authored by Dries's avatar Dries

- fixed small glitch in forum.module
parent bb66fa5f
......@@ -38,7 +38,7 @@ function forum_save($edit) {
}
function forum_num_comments($nid) {
$value = db_fetch_object(db_query("SELECT COUNT(cid) AS count FROM comments WHERE lid = '$nid' AND pid != 0"));
$value = db_fetch_object(db_query("SELECT COUNT(cid) AS count FROM comments WHERE lid = '$nid'"));
return ($value) ? $value->count : 0;
}
......
......@@ -38,7 +38,7 @@ function forum_save($edit) {
}
function forum_num_comments($nid) {
$value = db_fetch_object(db_query("SELECT COUNT(cid) AS count FROM comments WHERE lid = '$nid' AND pid != 0"));
$value = db_fetch_object(db_query("SELECT COUNT(cid) AS count FROM comments WHERE lid = '$nid'"));
return ($value) ? $value->count : 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment