title: fetch multiple value from same table using id value
body: <p>I want to fetch value Rows from single table.I want to fetch sub_id for specific id.</p>
  
  <p>I achieved my require ment in 2 query.I want to do it in single query.I want to display result as Event,order history,Eent Ticket,calander </p>
  
  <p><a href="https://i.stack.imgur.com/0n1yu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0n1yu.png" alt="["></a></p>
  
  <pre><code>$sql="select * from table1 where roles like %admin% and sub_id='0'"
  $sql1=mysql_query($sql);
  while($fet=mysql_fetch_assoc($sql1))
  {
   $id=$fet['id'];
   $query="select page_name from table1 where sub_id= '$id'";
    .. ..
  }
  </code></pre>