seleccionando las columnas en el select y usando alias:
Código SQL:
Ver originalSELECT t1.id AS id_1, t2.id AS id_2, t3.id AS id_3 FROM matches
INNER JOIN teams AS t1 ON matches.localTeam=t1.id
INNER JOIN teams AS t2 ON matches.visitingTeam=t2.id
INNER JOIN reservations AS r ON matches.id=r.refered