14 lines
480 B
JavaScript
14 lines
480 B
JavaScript
const con = require('./connect');
|
|
|
|
function insertSmartTag(smartTagFk, shelving, level) {
|
|
let sql = `INSERT INTO vn.smartTag (code, shelvingFk, level)
|
|
VALUES ('${smartTagFk}', '${shelving}', ${level})
|
|
ON DUPLICATE KEY
|
|
UPDATE shelvingFk = '${shelving}', level = ${level};`;
|
|
con.con.query(sql, function(err, result) {
|
|
if (err)
|
|
console.log(err);
|
|
});
|
|
}
|
|
exports.insertSmartTag = insertSmartTag;
|