'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 \'desc) VALUES (\'Haunted Candleer\', \'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVj\' at line 1',
.
{ 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 'desc) VALUES ('Haunted Candleer', 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVj' at line 1
.
'INSERT INTO shop (name, img, desc) VALUES (\'Haunted Candleer\', \'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEDe1VBDEjdszFNjMTvA82PCe4El98m2pxUyzFu31l-ZrO0aGA2cVCUB_QJDKRqpF68USYx6Zc7A4bmp71WLQnq59GTZrEycIYbjr3FIXk\', \'123123\') '
Работаю с NodeJS, Mysql, steam
Использую данные из инвентаря Steam
name: 'Haunted Candleer',
type: 'Level 71 Costume Piece',
Выдает ошибки выше (указаны выше)
manager.loadUserInventory('76561198853657017',440, 2, true, (err, inventory) => {
var sql1 = "INSERT INTO shop (name, desc) VALUES ? ";
var type = inventory[0].type;
var name = inventory[0].name;
var values = [
[name, type]
];
con.query(sql1, [values], function (err, result3) {
console.log(err);
});
});
Жду help
[values]
должно бытьvalues
, но вообще это какая-то муть.