I'm basically trying to code a simple threaded comments system where users can comment on other user's comment. It'll allow only one level of comments.
The comments table in the database is something like: - id - text - timestamp - parent_id (can be NULL)
My question is how should I query the comments and their children (comments)? I'm just not sure how they would be places in the array, and then how to loop and output them properly.
Your help is much appreciated =)