Anfrage schicken
This commit is contained in:
@@ -48,7 +48,7 @@ exports.getItem = function(identifier, callback) {
|
||||
}
|
||||
|
||||
exports.getItemList = function(callback) {
|
||||
const sql = `SELECT * FROM items i ORDER BY i.order ASC`
|
||||
const sql = `SELECT * FROM items i ORDER BY i.order DESC`
|
||||
|
||||
pool.query(sql, function (error, results, fields) {
|
||||
if (error) throw error;
|
||||
@@ -56,3 +56,13 @@ exports.getItemList = function(callback) {
|
||||
callback(results)
|
||||
});
|
||||
}
|
||||
|
||||
exports.getNotAvailableList = function(itemID, callback) {
|
||||
const sql = `SELECT a.item, a.from AS 'start', a.to as 'end' FROM available a WHERE a.item = ${itemID} ORDER BY a.from ASC`
|
||||
|
||||
pool.query(sql, function (error, results, fields) {
|
||||
if (error) throw error;
|
||||
|
||||
callback(results)
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user