I got multilevel comment system, I store comments in mysql database table with such fields:
id
article_id
user_id
date
content
comment_id
Where comment_id is parent comment's id.
how can i count number of replies to user comments after some specific date for all articles? e.g:
- comment1
-- comment1.1
--- comment1.1.1
-- comment1.2
-- comment1.3
--- comment1.3.1
if user posted comment1, i need query to return 5. If user posted comment 1.3 - return 1.