This is really an sql question I think.
I'm trying to write a comments system for a website, everything works except I can't figure out how to nest replies.
for example this is what I have now, comments are ordered by the table id
Post1:"qwerty"
Post2:"qwerty"
Post3:"qwerty"
Reply1:"ytrewq"
However if there is a reply to the first post I want it to appear below that post
Post1:"qwerty"
Reply1:"ytrewq"
Post2:"qwerty"
Post3:"qwerty"
Thats where I'm stuck, I tried creating a second key in the table containing the id of the first comment but i dunno, thats not working out.
This is all in the same table.