shmem's approach is right, and will work very well for smaller sites, but I would say that, for larger sites, you should consider adding a separate table which records all of these relationships. For instance, for:
blog 1
- reply 2
- reply 4
- reply 5
- reply 6
- reply 3
- reply 7
you could maintain a table like:
ancestor_id descendant_id
----------------------------
1 2
1 3
1 4
1 5
1 6
1 7
2 4
2 5
2 6
3 7
5 6
This would allow you to say: give me all the descendants of blog 1, or of reply 2. It has its own complications in that you're maintaining a separate table, and so need to keep the two in sync.
There are numerous patterns for expressing hierarchies, and the most effective one depends on the depth of your trees and how often that data changes. Have a look at Trees in SQL, adjacency lists and sorting. for a discussion of some of these. Also, look for anything by Joe Celko, author of Joe Celko's Trees and Hierarchies in SQL for Smarties, for example, his article Trees in SQL.
Clint