Hi, i need to get from the database the number of comments for every article, how do i do that ?
I tried this:
$query="SELECT count(id) FROM `#__jcomments` WHERE contentid='$id' AND published > 0 AND `option`='com_content' ";
$db->setQuery($query);
return (int) $db->loadResult();
but it doesn't seem to work. i'm new to this so I must be missing something simple or not

Other question is how do I remove the "read more" and nr of comments automatically inserted when jcomments is enabled.
Thank you.