$query = "select * from a ...";
if($result = mysql_query($query,$con))
{while($row = mysql_fetch_array($result);)
$arr[0][] = $row;
}
$query = "select * from b ...";
if($result = mysql_query($query,$con))
{
while($row = mysql_fetch_array($result);)
$arr[1][] = $row;
}
$query = "select * from c ...";
if($result = mysql_query($query,$con))
{
while($row = mysql_fetch_array($result);)
$arr[2][] = $row;
}
The 3 queries retrieves multiple rows with different structure, 3 queries need 3 round-trip, 10 queries will need 10 round-trip.
How will you optimize this case?