// Again, this will break if a song has more than one short title
pqxx::result res( t.exec(
- "SELECT nick, title, shorttitle, score FROM scores NATURAL JOIN tournaments NATURAL JOIN players NATURAL JOIN songs NATURAL LEFT JOIN songshorttitles WHERE tournament=" +
+ "SELECT nick, title, shorttitle, score FROM scores NATURAL JOIN tournaments JOIN players ON scores.player=players.player NATURAL JOIN songs NATURAL LEFT JOIN songshorttitles WHERE tournament=" +
pqxx::to_string(tournament) + " AND score IS NOT NULL ORDER BY score DESC LIMIT " +
pqxx::to_string(num)) );