Skip to content

Commit

Permalink
Fix insert indexes (Fixes #167)
Browse files Browse the repository at this point in the history
  • Loading branch information
games647 committed Jan 1, 2017
1 parent e4c6768 commit 5d7948f
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,15 @@ private void insert(List<PlayerStats> stats) {
+ "(?, ?, ?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS);

for (PlayerStats stat : stats) {
stmt.setInt(1, stat.getKills());
stmt.setInt(2, stat.getDeaths());
stmt.setInt(3, stat.getKillstreak());
stmt.setInt(4, stat.getMobkills());
stmt.setString(1, stat.getUuid() == null ? null : stat.getUuid().toString());
stmt.setString(2, stat.getPlayername());

stmt.setLong(5, stat.getLastOnline());
stmt.setString(6, stat.getPlayername());
stmt.setInt(3, stat.getKills());
stmt.setInt(4, stat.getDeaths());
stmt.setInt(5, stat.getKillstreak());
stmt.setInt(6, stat.getMobkills());

stmt.setLong(7, stat.getLastOnline());
stmt.addBatch();
}

Expand Down

0 comments on commit 5d7948f

Please sign in to comment.