I need to help retrieving hierarchial comments. I’m finding hard time doing so. I could retrieve one level of comments that is
-Main Comment
--Reply1
--Reply2
--Reply3
Replies that are under Reply1, Reply2, etc are not retrieved. The actual replies in database look like this:
-Main Comment
--Reply1
---ReplyA
----ReplyA1
---ReplyB
----ReplyB1
--Reply2
---ReplyA
--Reply3
As you see main comment can have multiple replies and a reply also can have descending replies and the list goes on.
I need to build a commenting system that is similar to vbulletin forum commenting system. I think vbulletin uses a hierarchical commenting system.
Feel free to provide supporting resources.
You need to use recursion for iterating throught this kind of hierarchical data.
http://www.codewalkers.com/c/a/Miscellaneous/Recursion-in-PHP/
http://devzone.zend.com/article/1235
Iterate through tree and on each node call childrens
}
I havent tested but you should get the idea.