How to store comments in the database? My table has the following comments: <br/> <pre> id, text, id_user, idPost </ pre> <br/> But there is still a reply to the comment and there may be several reply comments to one comment. Then how should the comment table look?



    1 answer 1

    Then you need a tree structure. Simply, each comment must have the id of the parent comment. And all business.