function listComments($postId, $limit = '')
{
if ($limit != '' and $limit > 0) $limit = " LIMIT 0, $limit";
$data = array();
$query = "SELECT comment_id, description, comment_by, comment_on
FROM posted_item_comments WHERE post_id='$postId' ORDER BY comment_on DESC $limit";
$res = $this->db->query($query);
$totRec = $res->num_rows();
if ($totRec > 0)
....