1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

Fix experience sorting in top command

This commit is contained in:
Krakenied 2022-03-15 16:19:10 +01:00
parent 8bd4ecaa04
commit 9b68671245

View File

@ -2712,8 +2712,7 @@ public abstract class JobsDAO {
try {
prest = conn.prepareStatement("SELECT `" + JobsTableFields.userid.getCollumn() + "`, `" + JobsTableFields.level.getCollumn() + "`, `" + JobsTableFields.experience.getCollumn() + "` FROM `"
+ getJobsTableName() + "` WHERE `" + JobsTableFields.jobid.getCollumn() + "` LIKE ? OR `" + JobsTableFields.jobid.getCollumn() + "` LIKE ? ORDER BY `" + JobsTableFields.level.getCollumn()
+ "` DESC, LOWER("
+ JobsTableFields.experience.getCollumn() + ") DESC LIMIT " + limit + ", 50;");
+ "` DESC, `" + JobsTableFields.experience.getCollumn() + "` DESC LIMIT " + limit + ", 50;");
prest.setInt(1, job.getId());
prest.setInt(2, job.getLegacyId());
res = prest.executeQuery();