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

14 lines
386 B
JavaScript

const con = require('./connect')
function maxWagon(collectionFk, callback){
let consSql = `SELECT MAX(tc.wagon)
FROM ticketCollection tc
WHERE tc.collectionFk = ${collectionFk}`;
con.con.query(consSql, function (err, result, fields) {
console.log(result);
callback(null,result);
});
}
exports.maxWagon = maxWagon;