Améliorations
This commit is contained in:
@@ -166,9 +166,15 @@ public class Database {
|
||||
List<String> series = new ArrayList<>();
|
||||
try {
|
||||
String query = "SELECT name FROM Series " +
|
||||
"WHERE creation_date BETWEEN ? AND ? " +
|
||||
"ORDER BY creation_date DESC " +
|
||||
"LIMIT ? OFFSET ?";
|
||||
"WHERE creation_date BETWEEN ? AND ? " +
|
||||
"ORDER BY " +
|
||||
" CASE " +
|
||||
" WHEN name LIKE 'Série custom%' THEN CAST(REGEXP_SUBSTR(name, '[0-9]+') AS UNSIGNED) " + // Extraction numérique pour 'Série custom'
|
||||
" ELSE NULL " +
|
||||
" END ASC, " + // Tri par numéro pour 'Série custom'
|
||||
" created_by_developer DESC, " + // Tri par développeur ou joueur
|
||||
" name ASC " + // Tri alphabétique
|
||||
"LIMIT ? OFFSET ?";
|
||||
|
||||
PreparedStatement statement = this.database.prepareStatement(query);
|
||||
statement.setDate(1, new java.sql.Date(startDate.getTime()));
|
||||
|
Reference in New Issue
Block a user