Here is the query I have to make in the browser:
/line?l1=##&l2=##&l3=##
And here is how I have it implemented with JS:
app.get('/line', (req, res) => {
let sql = `UPDATE car_info SET
l1 = ${parseInt(req.query.lineone)},
l2 = ${parseInt(req.query.linetwo)},
l3 = ${parseInt(req.query.linethree)}
WHERE name = '${req.cookies.uName.name}'`;
let lineQuerys = db.query(sql, (result) => {
res.send(`l1: ${req.query.lineone}, l2: ${req.query.linetwo}, l3: ${req.query.linethree}`);
})
});
the l1, l2, and l3 are as they are defined in my MySQL table. I keep getting this output when I type the query in the browser.
l1: undefined, l2: undefined, l3: undefined