I'm using Node.js to run a MySQL command and get an error when inserting into the datatbase
const db = require("../db.js")
db.query('INSERT INTO subways (listing_id,name,distance,lines) VALUES (?,?,?,?)', [results[0]['listing_id'], closestStations[index].properties.name, distance.distance.text, closestStations[index].properties.line], function (error, subwayResults, fields) {
if (error) console.log(error)
})
And this is my error { Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lines) VALUES (179,'Wall St','89 ft','2-3')' at line 1
The code seems similar to the other insert commands