I have a script I wrote I when I return to the comments, but it is only single-threaded. I would like it to be multi-threaded, but only so that the user can respond to the comment, and not so that the user can respond to the comment of the comment. Thus, the flows will be only two deep.
I am currently saving comment_id
compared to user_id
in my database.
The only way I can come up with multi-threaded comments is to have a parent
field in the comments table. But if I do, then when I select comments using PHP, I will need to do another SELECT command to select comments for children (if any) for each comment. It seems like most of the work with the database.
There must be a better way. Any ideas on this? Or textbooks?
Sean h jenkins
source share