1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

Merge pull request #1422 from Krakenied/master

Fix experience sorting (do not sort alphabetically lol)
This commit is contained in:
Zrips 2022-05-25 12:07:35 +03:00 committed by GitHub
commit 3352527434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();