diff --git a/app/src/main/java/com/example/haresh/tic_tac_toe_app/DatabaseHandler.java b/app/src/main/java/com/example/haresh/tic_tac_toe_app/DatabaseHandler.java index 35e1195..8953713 100644 --- a/app/src/main/java/com/example/haresh/tic_tac_toe_app/DatabaseHandler.java +++ b/app/src/main/java/com/example/haresh/tic_tac_toe_app/DatabaseHandler.java @@ -79,7 +79,7 @@ public scoreboard getPlayer(String name) { public List getAllContacts() { List scoreList = new ArrayList(); // Select All Query - String selectQuery = "SELECT * FROM " + TABLE_SCORES; + String selectQuery = "SELECT * FROM " + TABLE_SCORES + " ORDER BY " + KEY_SCORE + " DESC"; SQLiteDatabase db = this.getWritableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null);