Off the top of my head, I would add 2 columns to your table:
cat_level - Used to designate what level the title is at in the "outline". 0 = top level, 1 = sub-level 1, etc.
cat_order - used to establish the order of titles
Then you can pull out all the top level titles into an array with a simple query and do the same for each deeper sublevel as you need them. You may not even need help with the query then but as an example:
$maintitlequery = 'select * from Headings where cat_level = 0';
$toplevelresult = mysql_query($maintitlequery);
loop through the results and for each main heading, check for sub-headings:
$level1subheadingquery = 'select * from Headings where cat_level = 1';
$level1result = mysql_query($level1subheadingquery);
This way you are just creating nested loops in PHP?? or whatever to pull headings as you need them.
Does this make sense?
If you really need to pull them all out at once, you can use cursors if you are on MySQL 5.x but I don't believe 4.x supports cursors.
By the way, been working with MSSQL mostly for the last year so double check any MySQL syntax you get from me
