title: select children categories in mysql
body: <p>I have a nested categories. this is structure.</p>
  
  <pre><code>CREATE TABLE 'category' (
    'id' INT,
    'title' VARCHAR(50),
    'category_id' INT,
  )
  </code></pre>
  
  <p>relation is simple</p>
  
  <p>(id, parent id)</p>
  
  <pre><code>main (1, NULL)
  --parent (2, 1)
  ----child1 (3, 2)
  ----child2 (4, 2)
  --foo (5, 1)
  ----baz (6, 5)
  --bar (7, 1)
  </code></pre>
  
  <p>I want to select category's childrens (MYSQL)</p>
  
  <p>for "parent" category it is "child1" and "child2"</p>
  
  <p>for "main" category it is:</p>
  
  <pre><code>--parent (2, 1)
  ----child1 (3, 2)
  ----child2 (4, 2)
  --foo (5, 1)
  ----baz (6, 5)
  --bar (7, 1)
  </code></pre>
  
  <p>thanks!</p>