SELECT games.*, player1, player2
FROM games
INNER JOIN users player1 ON (games.player1id = player1.id)
INNER JOIN users player2 ON (games.player2id = player2.id)
[ { id: 1,
player1id: 1,
player2id: 3,
score1: 0,
score2: 0,
player1: '(1,player1name,1000)',
player2: '(2,player2name,1000)' } ]