-
Notifications
You must be signed in to change notification settings - Fork 2.5k
typeCast and prepared statement #390
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
Comments
You'll want to invoke it as the following: mysql.query(
{
sql: 'SELECT * FROM `editions_schedule` WHERE `edition_id` = ?',
values: [1],
typeCast: false
},
function(err, result){
console.log(result); //works fine
}); |
Thanks for that, but I think, at least, it must be in the manual. |
Actually, it should be possible to do the way you wrote. I'm going to change |
dresende
added a commit
that referenced
this issue
Feb 13, 2013
When sql was an object, the second argument was assumed as being callback instead of checking if it could be the values.
Please try the latest git commit. |
It works fine, thanks for help. |
dveeden
pushed a commit
to dveeden/mysql
that referenced
this issue
Jan 31, 2023
…h-fail-broken-pipe-error Fixes mysqljs#389 by not sending COM_QUIT until authenticated. Also refactor…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found that typeCast parameter in query didn't work with prepared statements.
Here is my example:
The text was updated successfully, but these errors were encountered: