title: categories and sub-categories sql order sorting
body: <p>I have the following tables</p>
  
  <p>table_name: categories  </p>
  
  <pre><code>id   name        parent  
  16   Rash Vest   41  
  17   Shorts      41  
  20   Tops        41  
  41   Shop        0  
  47   Mens        16  
  48   Womens      16  
  </code></pre>
  
  <p>table_name: items  </p>
  
  <pre><code>id   title                 alias                 catid  
  70   Rash Vest Black       rash-vest-black       47   
  96   Rash Vest Red         rash-vest-red         47  
  98   Rash Vest Womens Red  rash-vest-womens-red  48  
  </code></pre>
  
  <p>Now I want to display all items according to the root tree..</p>
  
  <p>Like This<br>
  Main Menu: <strong>SHOP</strong><br>
  Sub Menus: <strong>Rash Vest</strong> | Shorts |  Tops<br>
  Child categories:<br>
  Mens<br>
  ----->Rash Vest Black<br>
  ----->Rash Vest Red<br>
  Womens<br>
  ----->Rash Vest Womens Red  </p>