10 lines
380 B
JavaScript
10 lines
380 B
JavaScript
const con = require('./connect');
|
|
|
|
module.exports = function insertSmartTag(smartTagFk, shelving, level) {
|
|
const sql = `INSERT INTO vn.smartTag (code, shelvingFk, level)
|
|
VALUES (?, ?, ?)
|
|
ON DUPLICATE KEY
|
|
UPDATE shelvingFk = ?, level = ?;`;
|
|
return con.query(sql, [smartTagFk, shelving, level, shelving, level]);
|
|
};
|