$rs_group = mysql_query("SELECT count(order_generation) AS V_TOTAL1 , SUM(size_new) AS V_TOTAL , check_status , order_ID ,order_generation AS V_TOTAL2 FROM genneration_size
WHERE check_status='0' or check_status='1' or check_status='2' AND order_generation IN ('ASD', 'CSD', 'HRG', 'LBG', 'LSD', 'OBD', 'PFR', 'RAL', 'WSG', '$hdata')
GROUP BY order_generation");
while($row_group = mysql_fetch_array($rs_group))
{
$rs_menu = mysql_query("SELECT count(order_generation) AS V_TOTAL_new1 , SUM(size_new) AS V_TOTAL_new , check_status , order_ID ,order_generation AS V_TOTAL2_ FROM genneration_size WHERE check_status='0' or check_status='1' AND order_generation='$V_result3' AND order_generation IN ('ASD', 'CSD', 'HRG', 'LBG', 'LSD', 'OBD', 'PFR', 'RAL', 'WSG', '$hdata') AND order_generation = ".$row_group['order_generation']."
GROUP BY order_generation");
while($row_menu = mysql_fetch_array($rs_menu))
{
echo $row_menu['order_generation'];
}
}