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