Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка в форматировании запроса #8

Open
its16bit opened this issue Feb 17, 2024 · 0 comments
Open

Ошибка в форматировании запроса #8

its16bit opened this issue Feb 17, 2024 · 0 comments

Comments

@its16bit
Copy link

const admins = await R.findAll('users', 'server_number = ? AND admin_level >= ?', [user.server_number, 1]);

Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server at Sequence._packetToError (/VKBot/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Query.ErrorPacket (/VKBot/node_modules/mysql/lib/protocol/sequences/Query.js:79:18) at Protocol._parsePacket (/VKBot/node_modules/mysql/lib/protocol/Protocol.js:291:23) at Parser._parsePacket (/VKBot/node_modules/mysql/lib/protocol/Parser.js:433:10) at Parser.write (/VKBot/node_modules/mysql/lib/protocol/Parser.js:43:10) at Protocol.write (/VKBot/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket.<anonymous> (/VKBot/node_modules/mysql/lib/Connection.js:88:28) at Socket.<anonymous> (/VKBot/node_modules/mysql/lib/Connection.js:526:10) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:559:12) -------------------- at Protocol._enqueue (/VKBot/node_modules/mysql/lib/protocol/Protocol.js:144:48) at Connection.query (/VKBot/node_modules/mysql/lib/Connection.js:198:25) at /VKBot/node_modules/knex/lib/dialects/mysql/index.js:132:18 at new Promise (<anonymous>) at Client_MySQL._query (/VKBot/node_modules/knex/lib/dialects/mysql/index.js:126:12) at executeQuery (/VKBot/node_modules/knex/lib/execution/internal/query-executioner.js:37:17) at Client_MySQL.query (/VKBot/node_modules/knex/lib/client.js:146:12) at Runner.query (/VKBot/node_modules/knex/lib/execution/runner.js:123:36) at ensureConnectionCallback (/VKBot/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17) at Runner.ensureConnection (/VKBot/node_modules/knex/lib/execution/runner.js:300:20) { 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 sqlState: '42000', index: 0, sql: 'select * from users where 1=1 server_number = 1 AND admin_level >= 1'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant