title: Select all items for category and all from its subcategories
body: <p>I'm trying to build my own webshop.<br>
  I have two tables - products and categories. The structure is like that :  </p>
  
  <hr>
  
  <pre><code>categories :
  id       name       parent_id  
  </code></pre>
  
  <hr>
  
  <pre><code>products :
  id       title      category_id  
  </code></pre>
  
  <hr>
  
  <p>At the moment when the user clicks on main category I'm selecting products to display like that :</p>
  
  <pre><code>url : www.mypage.com/?category_id=1
  sql : 'SELECT * FROM products WHERE category_id = 1'  
  </code></pre>
  
  <p>The problem is that I'd like to make it when the user clicks on main category to select also all the products from its child categories. For example category <code>Family</code> is sub category of category <code>Cars</code> and in the db looks like that  </p>
  
  <pre><code>categories :
  id       name       parent_id  
  1        'Cars'     0
  2        'Family'   1  
  3        'Sport'    1  
  
  products :
  id       title      category_id  
  1        'Ferrari'  3 
  2        'Honda'    2  
  </code></pre>
  
  <p>As you can see my current select will not select <code>Ferrari</code> or <code>Honda</code> because the user is looking at category with <code>id=1</code>...
  How to modify my select so it will display all products from the child categories of the main category?</p>