title: How to make a MySQL select for a tree structure?
body: <p>I have a table in MySQL:</p>
  
  <pre><code>id       name        parent_id
  1        animals       null
  2        mammal         1
  3        feline         2
  4        human          2
  5        cat            3
  6        invertebrate   1
  7        snake          6
  8        objects        null
  etc..
  </code></pre>
  
  <p>I want a MySQL query that displays the results in this order:</p>
  
  <pre><code>    Animals
         Mammal
            Feline
               Cat
            Human
         Invertebrate
      Objects
  etc..
  </code></pre>
  
  <p>I'm still learning and am completely stuck with this one.</p>