【发布时间】:2014-09-15 21:01:36
【问题描述】:
我有两张桌子
匹配数据: id_team1, id_team2, name_team1, name_team2, group_order_id
团队: team_id,team_name
我试试这个:
select * from matchdata join teams on matchdata.id_team1 = teams.team_id;
但我需要
matchdata.id_team1 = teams.team_id
与
matchdata.id_team2 = teams.team_id
之后我想要select WHERE group_order_id = $bla
我该怎么做?
【问题讨论】:
-
您是否考虑过不在比赛数据中存储名称,而只是在需要时从团队中检索它们?