SELECT *
FROM banhammer_bans
INNER JOIN banhammer_players AS player
ON banhammer_bans.player_id = player.id
INNER JOIN banhammer_players AS admin
ON banhammer_bans.creator_id = admin.id
ORDER BY created_at DESC
我从 banhammer_players 表中得到三id
列和两列。name
如何将它们分开,以便在我的 PHP 代码中使用它们?
banhammer_players 包含两列,id
和name
. banhammer_bans 有两列 (player_id
和creator_id
) 都与 banhammer_players 表匹配。