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/insertSmartTag.js

10 lines
380 B
JavaScript
Raw Normal View History

2021-03-18 10:38:28 +00:00
const con = require('./connect');
2021-03-12 12:34:06 +00:00
2022-03-31 09:55:41 +00:00
module.exports = function insertSmartTag(smartTagFk, shelving, level) {
2022-03-30 12:58:49 +00:00
const sql = `INSERT INTO vn.smartTag (code, shelvingFk, level)
VALUES (?, ?, ?)
2022-02-07 12:46:04 +00:00
ON DUPLICATE KEY
2022-03-30 12:58:49 +00:00
UPDATE shelvingFk = ?, level = ?;`;
2022-04-01 12:17:36 +00:00
return con.query(sql, [smartTagFk, shelving, level, shelving, level]);
2022-03-31 09:55:41 +00:00
};