Anfrage schicken

This commit is contained in:
2019-03-23 20:16:23 +01:00
parent a161ebff99
commit 825eff80d8
26 changed files with 3339 additions and 43 deletions
+11 -1
View File
@@ -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)
});
}