I have an sql insert and I recive the following error:
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CR0001'' at line 1",
sqlState: '42000',
index: 0,
sql: "INSERT INTO coordonate (id_scooter,lat,longi,alt,ip,port,speed,nr_satelites,battery_lvl) VALUES 'CR0001'"
my code is:
var insert = "INSERT INTO coordonate (id_scooter,lat,longi,alt,ip,port,speed,nr_satelites,battery_lvl) VALUES ? ";
con.query(insert, [array[0],array[3],array[4],array[5],rinfo.address,rinfo.port,array[6],array[2],array[1]], function (err, result) {
if (err) throw err;