We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here are results of normal sql statement and prepare statement, and the result is quite different.
emysql:execute(pool, "select * from test where id in (1,2)", []).
the result contains exactly two records which id are 1 and 2.
emysql:execute(pool, "select * from test where id in (?)", ["1,2"])
which returns only one record with id 1
The text was updated successfully, but these errors were encountered:
For that to work as expected it would be SQL injection, no?
You need to use multiple binds with dynamic SQL or use FIND_IN_SET (http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_find-in-set).
Sorry, something went wrong.
No branches or pull requests
Here are results of normal sql statement and prepare statement, and the result is quite different.
the result contains exactly two records which id are 1 and 2.
which returns only one record with id 1
The text was updated successfully, but these errors were encountered: