title: Mysql: Select from parent table, only if child table has rows
body: <p>I need your help,
  How do I Select from a parent table, only if child table (another table that depends on id of parent table) has rows in php?</p>
  
  <p>For instance:
  I have <code>CATEGORY</code> table and <code>Items</code> table. Where <code>Category</code> is the parent table and contains <code>ct_id, ct_name</code>,  while <code>Items</code> is child table which contains <code>it_id, ct_id</code> (linked to parent table), <code>it_name</code></p>
  
  <p><strong>PS: I don't need to select items, but I need only Categories ONLY if there are items linked to this table.</strong></p>
  
  <p>Thank you</p>