I want to fetch value Rows from single table.I want to fetch sub_id for specific id.
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
$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'";
.. ..
}

$sql="select * from table1 where roles like %admin% and sub_id='0'"in this query you are actually gettingpage_namealso . No need of second query in while looppage_nameagain as it is already retrieved in your first query?page_nameagain?You already have it in$fetvariable.