This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
smart-tag/db/maxWagon.js

13 lines
371 B
JavaScript
Raw Normal View History

2021-03-18 10:38:28 +00:00
const con = require('./connect');
2021-03-16 11:25:32 +00:00
2021-03-18 10:38:28 +00:00
function maxWagon(collectionFk, callback) {
2021-03-24 10:45:57 +00:00
let consSql = `SELECT MAX(tc.wagon) AS MaxWagons
2021-03-16 11:25:32 +00:00
FROM ticketCollection tc
WHERE tc.collectionFk = ${collectionFk}`;
2021-03-18 10:38:28 +00:00
con.con.query(consSql, function(err, result, fields) {
callback(null, result);
2021-03-16 11:25:32 +00:00
});
}
2021-03-18 10:38:28 +00:00
exports.maxWagon = maxWagon;