Merge pull request #23 from ProjectGroepA2/feature/sorting

Feature/sorting
This commit is contained in:
2015-07-07 12:21:42 +02:00
7 changed files with 108 additions and 26 deletions
+12
View File
@@ -191,6 +191,18 @@ public class SQLConnector
} catch (SQLException e) {
e.printStackTrace();
}
Statement st4 = executeResultQuery("SELECT MAX(`score`) as score FROM `highscore` WHERE `songinstance`=(SELECT id FROM songinstance WHERE song=" + id + " AND difficulty='" + si.getDifficulty() + "')");
try {
ResultSet rs4 = st4.getResultSet();
if(rs4.next())
{
int i = rs4.getInt(1);
si.setHighestScore(i);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
else