fix(db): fix order in some cases for future db structure
This commit is contained in:
@ -5,7 +5,7 @@ module.exports = (sphinx, table, callback, doneCallback, max = 1000, where = '',
|
|||||||
doneCallback(true)
|
doneCallback(true)
|
||||||
done(true)
|
done(true)
|
||||||
}
|
}
|
||||||
const data = await sphinx.query(`SELECT * FROM ${table} WHERE id > ${index} ${where} LIMIT ${max}`);
|
const data = await sphinx.query(`SELECT * FROM ${table} WHERE id > ${index} ${where} ORDER BY id ASC LIMIT ${max}`);
|
||||||
if(data.length == 0) {
|
if(data.length == 0) {
|
||||||
finish()
|
finish()
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user