diff --git a/core/external b/core/external index e790ac2c09d2970b7d99c48bfcfacb5f17c1fcf8..02b228989f9e90ffc9634ae88bc48be1e3875418 160000 --- a/core/external +++ b/core/external @@ -1 +1 @@ -Subproject commit e790ac2c09d2970b7d99c48bfcfacb5f17c1fcf8 +Subproject commit 02b228989f9e90ffc9634ae88bc48be1e3875418 diff --git a/core/src/cz/nic/tablexia/model/game/GameDAO.java b/core/src/cz/nic/tablexia/model/game/GameDAO.java index 9bab2ada9a5486d2ccbd038fa933338a0ecd9805..445f0fb88f2789c4c771f8b4591f1031131b6370 100644 --- a/core/src/cz/nic/tablexia/model/game/GameDAO.java +++ b/core/src/cz/nic/tablexia/model/game/GameDAO.java @@ -118,7 +118,7 @@ public class GameDAO { public static final String GAME_SELECT_FOR_ID = "SELECT id, user_id, difficulty_number, game_number, random_seed, start_time, end_time FROM game WHERE id = ?"; public static final String GAME_SELECT_LAST_ID = "SELECT max(id) FROM game"; public static final String GAME_SELECT_COUNT_FOR_GAME_AND_DIFFICULTY = "SELECT count(id) FROM game WHERE game_number = ? AND difficulty_number = ? AND user_id = ? AND end_time IS NOT NULL"; - public static final String GAME_SELECT_FOR_USER_AND_DEFINITION = "SELECT id, user_id, difficulty_number, game_number, random_seed, start_time, end_time FROM game WHERE user_id = ? AND game_number = ? AND end_time IS NOT NULL"; + public static final String GAME_SELECT_FOR_USER_AND_DEFINITION = "SELECT id, user_id, difficulty_number, game_number, random_seed, start_time, end_time FROM game WHERE user_id = ? AND game_number = ? AND end_time IS NOT NULL AND end_time != 0"; public static final String GAME_SELECT_COUNT_FOR_GAME = "SELECT count(id) FROM game WHERE game_number = ? AND user_id = ?"; public static final String GAME_SELECT_ALL_FOR_USER_SYNC = "SELECT id, user_id, difficulty_number, game_number, random_seed, start_time, end_time FROM game where user_id = ? AND sync_at is null"; public static final String GAME_SELECT_BY_START_AND_END = "SELECT id FROM game WHERE user_id = ? AND start_time = ? AND end_time = ?";