I have a table representing posts on a message board. Posts may or may not have parents.
What is the most common way to get all posts starting from a given post, or to find the root post of any given post?
I can think of using JOINs to join parents and children, but how can I know how many joins I need before I stop?