db update
This commit is contained in:
parent
ac7847c3cc
commit
033e4a6e12
|
@ -1,5 +1,5 @@
|
|||
const mysql = require('mysql');
|
||||
const config = require('./config');
|
||||
const config = require('../config');
|
||||
|
||||
var con = mysql.createConnection({
|
||||
host: "test-db.verdnatura.es",
|
||||
|
@ -9,4 +9,9 @@ var con = mysql.createConnection({
|
|||
port: 3307,
|
||||
});
|
||||
|
||||
con.connect(function(err) {
|
||||
if (err) throw err;
|
||||
console.log("Connected!");
|
||||
});
|
||||
|
||||
exports.con = con;
|
|
@ -1,9 +1,9 @@
|
|||
const con = require('./connectDB.js')
|
||||
const con = require('./connect.js')
|
||||
|
||||
con.con.connect(function(err) {
|
||||
if (err) throw err;
|
||||
console.log("Connected!");
|
||||
var sql = "INSERT INTO vn.smartTag (code, shelvingFk, `level`) VALUES('A0A3B8200DA9', 'ABC', 2);";
|
||||
var sql = "INSERT INTO vn.smartTag (code, shelvingFk, `level`) VALUES('A0A3B8200DA1', 'ABC', 2);";
|
||||
con.con.query(sql, function (err, result) {
|
||||
if (err) throw err;
|
||||
console.log("1 record inserted");
|
Reference in New Issue