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

19 lines
513 B
JavaScript
Raw Normal View History

2021-03-18 10:38:28 +00:00
const con = require('./connect');
2021-03-12 11:05:39 +00:00
con.con.connect(function(err) {
if (err) throw err;
2021-03-18 10:38:28 +00:00
let sql = `INSERT INTO vn.smartTag (code, shelvingFk, level) VALUES
2021-03-12 11:05:39 +00:00
('A0A3B8288AB1', 'ABC', 1),
('A0A3B8288AB2', 'ABC', 2),
('A0A3B8288AB3', 'ABC', 3),
('A0A3B8288AB4', 'ABC', 4),
('A0A3B8299CD1', 'DEF', 1),
('A0A3B8299CD2', 'DEF', 2),
('A0A3B8299CD3', 'DEF', 3),
('A0A3B8299CD4', 'DEF', 4)
;`;
2021-03-18 10:38:28 +00:00
con.con.query(sql, function(err, result) {
if (err) throw err;
2021-03-12 11:05:39 +00:00
});
2021-03-18 10:38:28 +00:00
});