title: Display Articles of Sub Categories in a Main Category PHP MYSQL
body: <p>I have a category table</p>
  
  <pre><code>cat_id, cat_name, parent_id, cat_slug
  </code></pre>
  
  <p>and I have article table as follow</p>
  
  <pre><code>art_id, cat_id, art_title, art_content, author_id .....
  </code></pre>
  
  <p>and my users table as</p>
  
  <pre><code>user_id, username, pw, .....
  </code></pre>
  
  <p>so with these data, I want to display all articles which are listed under sub category</p>
  
  <p>for example:</p>
  
  <p>url of main category is: mydomain.com/cat/business
  url of sub category is: mydomian.com/cat/business/advertising</p>
  
  <p>so when people visit the main category, then it should display the subcategories listed articles on main category even though the cat_id is not mentioned as main category. I want to list out all sub categories of business's subcategories articles on business category page.</p>
  
  <p>what is the query, i should try to achieve this</p>
  
  <p>help will be appreciated. thanks</p>