je veux afficher les matchs avec le nom des joueurs (et pas leur id ;-) !!!) donc je fais :
select matchs.id, matchs.idjoueur1, joueur1.nom, matchs.idjoueur2, joueur2.nom
FROM matchs, joueur as joueur1, joueur as joueur2
where
joueur2.id=matchs.idjoueur2 and
joueur1.id=matchs.idjoueur1
order by ID
il il m'affiche TOUJOURS le nom du Joueur1 sur les 2 colonnes !!!!!!!
J'utilise MySQL comme base, mais ca ne devrait pas poser de problèmes non ?
select matchs.id, matchs.idjoueur1, joueur1.nom as NOM1, matchs.idjoueur2, joueur2.nom as NOM2
FROM matchs, joueur1 joueur, joueur2 joueur
where
joueur2.id=matchs.idjoueur2 and
joueur1.id=matchs.idjoueur1
order by ID