0
我对使用codeigniter加入的选择有疑问:在Codeigniter中选择加入
我有2个表格。
table game
id | id_team1 | id_team2
99 | 1 | 2
table team
id | team
1 | Real
2 | Barcelona
我要回队安装摊牌:真正的X巴萨
我选择这个问题,以及:
$this->db->select('game.*, team.team AS team_name1, team.team AS team_name2');
$this->db->from('game');
$this->db->join('team', 'team.id = game.id_team1');
这样我可以第一,但不是第二回队团队或反之亦然,改变加入jogo.id_team2
我必须返回这两个团队,因为我的加入或否则我该怎么办?
谢谢!
喜bekt 准确,更容易比我想象的,但不能 非常感谢您! – Flybow