The following is a simplified table structure showing messages belonging to a single mail trail. i.e. the trail started with messageID 46 (where parentMessageID = 0). Message 47 is a reply to message 46. Message 89 is a reply to message 47.
tblMessages
messageID parentMessageID
-----------------------------
46 0
47 46
89 47
The table would obviously have thousands of message records.
How would you query the table to get all messages in a particular trail, e.g. the trail shown above?