I have a self-referencing table:
id {PK}
comment
parent {FK}
Here parent is the foreign key to the id of this table. I need to create the comment tree, something like:
this is my comment
this is reply to comment
this is a reply to 2nd comment
this is new comment
Usually I do this by building an array with tree structure having made only 1 SQL query. I just wanted to find out if there is any new and more optimum way to do that.
Thanks in advance,
Tim.
P.S. Please do not offer recursive functions
_________________
First free hosting reseller program



