Answer the question
In order to leave comments, you need to log in
Designing a comment system in mysql?
Hello!
Need help and advice!
I’m making a multi-level comment system like here,
but there’s a blunt right away - how to implement infinite nesting without a huge number of requests to display this kind of structure, as in screenshots
, two options come to mind:
1) Comment
table Like / dislike comment
table
comments - id, parent_id, post_id, text
comment_likes - comment_id, user_id, post_id, type(1- like/ 0 -dislike)
comments - id, post_id, text
comment_replies - comment_id, reply_id, level
comment_likes - comment_id, user_id, post_id, type(1- like/ 0 -dislike)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question