我收到了MYSQL错误

时间:2018-03-10 16:34:56

标签: mysql

请帮助,我收到此错误。不知道我应该做什么:)我是新手编码和东西所以是啊!

错误:

   at Query.Sequence._packetToError (/var/www/html/bot/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
at Query.ErrorPacket (/var/www/html/bot/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)
at Protocol._parsePacket (/var/www/html/bot/node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (/var/www/html/bot/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/var/www/html/bot/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/var/www/html/bot/node_modules/mysql/lib/Connection.js:103:28)
at Socket.emit (events.js:127:13)
at addChunk (_stream_readable.js:269:12)
at readableAddChunk (_stream_readable.js:256:11)
at Socket.Readable.push (_stream_readable.js:213:10)
--------------------
at Protocol._enqueue (/var/www/html/bot/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Connection.query (/var/www/html/bot/node_modules/mysql/lib/Connection.js:208:25)
at Socket.<anonymous> (/var/www/html/bot/server.js:1924:19)
at Socket.emit (events.js:127:13)
at /var/www/html/bot/node_modules/socket.io/lib/socket.js:513:12
at process._tickCallback (internal/process/next_tick.js:150:11)


code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlMessage: '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 \'` WHERE `steamid` = 76561198215872752 LIMIT 1\' at line 1',
  sqlState: '42000',
  index: 0,
  sql: 'SELECT `* FROM `users` WHERE `steamid` = 76561198215872752 LIMIT 1' } '(server.js:1926:17)'

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

试试这个:

SELECT * FROM `users` WHERE `steamid` = `76561198215872752` LIMIT 1;