i have a table for Comments (ID, UserName, UserEmail, CommentBody, PostID)
and another table for its Replies (ID, UserName, UserEmail, SubCommentBody, ParentCommentID)
in this case i have only one nested comment/reply and each comment can have more than one replies but replies can't have any replies
for example:
Comments Table
ID UserName UserEmail CommentBody PostID
-- -------- --------- ----------- ------
1 Dave a@gmail.com hello... 148
2 Alex b@gmail.com hi.... 205
3 John c@gmail.com something.. 205
Replies Table
ID UserName UserEmail SubCommentBody ParentCommentID
-- -------- --------- ----------- ---------------
1 Jimmy g@gmail.com BlaBla... 1
2 Ben h@gmail.com Fine.... 1
3 Jerry m@gmail.com something.. 2
how i write a query to get comments and its replies? i have no idea :)