I have a table messages.
The basic values are:
messageID, parentID, subject and body.
I have a function that receives the id of a node and with that information I want to select all the replies to that message...
that means replies, subreplies ... etc...
In other words... I want to be able to create a message tree with any rootmessage you could want to make a tree of.
Is it possible to do this with one single SQL-statement? Recursion? Can anybody help?
PS! parentID references to the messageID of the message it is a reply to.
Thanks!
Kristian