title: Howto get tree view? mysql
body: <p>I have the following tables :</p>
  
  <p><strong>specifications</strong> : </p>
  
  <pre><code>id | name
  -----------
  1  | hello
  2  | world
  3  | foo
  4  | bar
  </code></pre>
  
  <p><strong>properties</strong> :</p>
  
  <pre><code>name   | value  | specID
  ---------------------
  status | finish | 1
  parent | 2      | 1
  status | work   | 2
  parent | 3      | 2
  status | ...    | 4
  parent | 3      | 4
  </code></pre>
  
  <p>Now I want to say : </p>
  
  <blockquote>
    <p>List all specifications under specID 3.</p>
  </blockquote>
  
  <p>I don't now the levels down but the result must be:</p>
  
  <pre><code>id | name  | parent
  ------------------
   3 | foo   |  NULL
   2 | world | 3
   1 | hello | 2
   4 | bar   | 3
  </code></pre>
  
  <p>How can i do this in mysql?</p>