0
我有兩個表中的一個是戰鬥和第二是用戶的表結構和表中的記錄是像下面 的USER_ID和competitor_id是從用戶表的IDMySQL的:獲得從其他表的多個數據匹配的ID
A. Battle table
battle_id | user_id | competitor_id
1 | 1 | 5
2 | 3 | 4
3 | 2 | 3
B. User table
ID | user_name
1 | ABC
2 | XYZ
3 | PQR
4 | MNO
5 | UVW
我要取的名字USER_ID和competitor_id 輸出應該像下面
輸出
battle_id | user_id | competitor_id | user_name | competitor_name
1 | 1 | 5 | ABC | UVW
2 | 3 | 4 | PQR | MNO
3 | 2 | 3 | XYZ | PQR