1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Fix SQLException when the desc limit started from -1

Fixes #871
This commit is contained in:
montlikadani 2020-08-04 18:11:53 +02:00
parent 6d21e14725
commit b4f0744391

View File

@ -2499,6 +2499,9 @@ public abstract class JobsDAO {
PreparedStatement prest = null;
ResultSet res = null;
if (limit < 0)
limit = 0;
try {
prest = conn.prepareStatement("SELECT `" + JobsTableFields.userid.getCollumn() + "`, `" + JobsTableFields.level.getCollumn() + "`, `" + JobsTableFields.experience.getCollumn() + "` FROM `"
+ getJobsTableName() + "` WHERE `" + JobsTableFields.jobid.getCollumn() + "` LIKE ? ORDER BY `" + JobsTableFields.level.getCollumn() + "` DESC, LOWER("