This commit is contained in:
2019-06-10 18:32:40 +10:00
parent 83b2adb0b8
commit be807dd32d
+1 -1
View File
@@ -111,7 +111,7 @@ const isSpying = (connection, user, cb) => {
const getLadderData = (connection, field, start, length, cb) => { const getLadderData = (connection, field, start, length, cb) => {
//moved here for reusability //moved here for reusability
let query = 'SELECT accounts.id AS id, username, soldiers, recruits, gold FROM accounts JOIN profiles ON accounts.id = profiles.accountId ORDER BY ladderRank DESC LIMIT ?, ?;'; let query = 'SELECT accounts.id AS id, username, soldiers, recruits, gold FROM accounts JOIN profiles ON accounts.id = profiles.accountId ORDER BY ladderRank ASC LIMIT ?, ?;';
connection.query(query, [start, length], (err, results) => { connection.query(query, [start, length], (err, results) => {
cb(err, results); cb(err, results);
}); });