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
Queries with NOT IN clause #43
Comments
Can you post full query text where error can be reproduced? |
also, what happens when you prepare & execute your query from the command line client? See examples how to use |
create a gist please so I can copy&pasete text |
I know that the problem is with NOT IN clause, because I've subdivied the query until get where is the error, and if I execute the simplified query: |
Thanks! On it :) |
Can't reproduce on a simple example. The |
You're right, your example works for me too, I don't know what's happening with my query because the number of arguments is right (If I remove the "NOT" it works). Anyway it's clear that is my fault, sorry for the inconvenience. Thanks crack! |
if you set breakpoint (or dump with console.log) here - https://github.com/sidorares/node-mysql2/blob/master/lib/commands/execute.js#L48 - you'll be able to see expected number of parameters. |
or, even better - here - https://github.com/sidorares/node-mysql2/blob/master/lib/commands/execute.js#L60 |
I'll probably add some way to access |
I'll try, once I solve it I will tell you 👍 |
When I execute a query like:
SELECT * FROM T WHERE ID IN(?,....)
it works perfect...
But If I execute the same query in negative
SELECT * FROM T WHERE ID NOT IN(?,....)
I get the following error:
{
"code": "ER_WRONG_ARGUMENTS",
"sqlState": "#HY00"
}
I've checked the arguments and number of arguments and they're ok.
Thanks a lot for your support!
The text was updated successfully, but these errors were encountered: