If you check the comment table, you can see taht each comment has a CID number. For each article I need to have the CID number of all the comments for that article.
So I have written the following in node.tpl.php file:
$result=db_select('comment', 'c') ->fields('cid') ->condition('nid', $node->nid,'='); $record=$result->execute()->fetch();
But I get error. So what is my mistake?