upd: change sorting of trainings to descending
authorINOPIAE <m.maengel@inopiae.de>
Tue, 8 Jan 2019 05:03:59 +0000 (06:03 +0100)
committerINOPIAE <m.maengel@inopiae.de>
Wed, 9 Jan 2019 19:36:51 +0000 (20:36 +0100)
Enable user to find the last records easier, especially for support.

Change-Id: I3a1aacbf8d4c128b99640e443df1a97606786005

src/club/wpia/gigi/dbObjects/User.java

index 1c6b39b..10586d7 100644 (file)
@@ -572,7 +572,7 @@ public class User extends CertificateOwner {
     }
 
     public String[] getTrainings() {
-        try (GigiPreparedStatement prep = new GigiPreparedStatement("SELECT `pass_date`, `type_text`, `language`, `version` FROM `cats_passed` LEFT JOIN `cats_type` ON `cats_type`.`id`=`cats_passed`.`variant_id`  WHERE `user_id`=? ORDER BY `pass_date` ASC")) {
+        try (GigiPreparedStatement prep = new GigiPreparedStatement("SELECT `pass_date`, `type_text`, `language`, `version` FROM `cats_passed` LEFT JOIN `cats_type` ON `cats_type`.`id`=`cats_passed`.`variant_id`  WHERE `user_id`=? ORDER BY `pass_date` DESC")) {
             prep.setInt(1, getId());
             GigiResultSet res = prep.executeQuery();
             List<String> entries = new LinkedList<String>();