例1
以上查询语句
1、所有的队伍人员信息: select distinct teamname,realname,users.usertype,clothsize,gender,mobile,address,zipcode,team_users.teamid from users,team_users,team where users.userid = team_users.userid and team.teamid = team_users.teamid and team.matchid = 3ORDER BY team.teamid
2、分组后的队伍人员信息: select distinct teamname,realname,users.usertype,clothsize,gender,mobile,address,zipcode,team_users.teamid from users,team_users,team where users.userid = team_users.userid and team.teamid = team_users.teamid and team.matchid = 3GROUP BY team.teamid
将2分组后的结果当为外循环 比如分组后的队伍teamid为 67,70, 71, 79
将1所有队伍人员信息做为内循环,用67 70 71分别遍历完整个 1 的结果
control层
//得到所有本赛事的报名分组数据,循环遍历进行重构数组数据
//本赛事队伍分组后的信息group by team.te