Отправляя запрос, я получаю ошибку:
{ 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 ' from,to,time) value ("Что???","12","13","1498030309906")' at line 1
at Query.Sequence._packetToError (/root/node_modules/mysql/lib/protocol/sequ ences/Sequence.js:52:14)
at Query.ErrorPacket (/root/node_modules/mysql/lib/protocol/sequences/Query. js:77:18)
at Protocol._parsePacket (/root/node_modules/mysql/lib/protocol/Protocol.js: 280:23)
at Parser.write (/root/node_modules/mysql/lib/protocol/Parser.js:75:12)
at Protocol.write (/root/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/node_modules/mysql/lib/Connection.js:103:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
--------------------
at Protocol._enqueue (/root/node_modules/mysql/lib/protocol/Protocol.js:141: 48)
at Connection.query (/root/node_modules/mysql/lib/Connection.js:208:25)
at WebSocket. (/root/api.js:283:32)
at emitOne (events.js:96:13)
at WebSocket.emit (events.js:191:7)
at Receiver._receiver.onmessage (/root/node_modules/ws/lib/WebSocket.js:146: 47)
at Receiver.dataMessage (/root/node_modules/ws/lib/Receiver.js:389:14)
at Receiver.getData (/root/node_modules/ws/lib/Receiver.js:330:12)
at Receiver.startLoop (/root/node_modules/ws/lib/Receiver.js:165:16)
at Receiver.add (/root/node_modules/ws/lib/Receiver.js:139:10)
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlState: '42000',
index: 0 }
Как я понимаю, там не хватает символов или что? Полный запрос должен был получиться
INSERT INTO `messages` (msg,from,to,time) value ("Чтооо?","12","13","2142314324")
В чём проблема?