comment_num_replies
- Versions
- 4.6 – 7
comment_num_replies($pid)
Get replies count for a comment.
Parameters
$pid The comment id.
Return value
The replies count.
Code
modules/comment/comment.module, line 1134
<?php
function comment_num_replies($pid) {
static $cache;
if (!isset($cache[$pid])) {
$cache[$pid] = db_result(db_query('SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND status = %d', $pid, COMMENT_PUBLISHED));
}
return $cache[$pid];
}
?>Login or register to post comments 