Commit d72bd376 authored by Drahomír Karchňák's avatar Drahomír Karchňák

#310 UserTrophy's SQL statements doesnt select locale anymore...

parent e83f376a
......@@ -55,7 +55,7 @@ public class GameTrophy {
public static class ThreeStarsReceived implements GameTrophyResolver {
public static final String GAME_SELECT_FOR_GAME_AND_DIFFICULTY = "SELECT id, user_id, difficulty_number, game_number, language, random_seed, start_time, end_time FROM game WHERE game_number = ? AND difficulty_number = ? AND user_id = ? AND end_time IS NOT NULL";
public static final String GAME_SELECT_FOR_GAME_AND_DIFFICULTY = "SELECT id, user_id, difficulty_number, game_number, random_seed, start_time, end_time FROM game WHERE game_number = ? AND difficulty_number = ? AND user_id = ? AND end_time IS NOT NULL";
private static List<Game> getGamesForGameAndDifficulty(User user, GameTrophyDefinition trophyDef) {
List<Game> games = new ArrayList<Game>();
......@@ -67,14 +67,13 @@ public class GameTrophy {
try {
ResultSet resultSet = statement.executeQuery();
while (resultSet.next()) {
String startTimeStr = resultSet.getString(7);
String endTimeStr = resultSet.getString(8);
String startTimeStr = resultSet.getString(6);
String endTimeStr = resultSet.getString(7);
Game game = new Game(resultSet.getLong(1),
UserDAO.selectUser(resultSet.getLong(2)),
resultSet.getInt(3),
resultSet.getInt(4),
resultSet.getInt(5),
resultSet.getLong(6),
resultSet.getLong(5),
startTimeStr != null ? Long.valueOf(startTimeStr) : null,
endTimeStr != null ? Long.valueOf(endTimeStr) : null);
game.setGamePauses(GamePauseDAO.selectGamePausesForGame(game));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment