.execute not working #1600
Unanswered
AlexInCube
asked this question in
Q&A
Replies: 3 comments 3 replies
mySQLconnection.execute(
'UPDATE slot_stats SET total_games = total_games + 1 WHERE user_id = ?;' +
'UPDATE slot_stats SET total_wins = total_wins + ? WHERE user_id = ?;' +
'UPDATE slot_stats SET jackpots = jackpots + ? WHERE user_id = ?;',
[win, jackpot, userId],
function (err) {
if (err) throw err
})I split one big query into 3 small and setting multipleStatements: true and I get |
0 replies
|
when i make 'UPDATE slot_stats SET total_games = total_games + 1 WHERE user_id = ?;' |
0 replies
what do you get in the response? do you see |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
mySQLconnection.execute(
'UPDATE slot_stats SET total_games = total_games+1, total_wins = total_wins + ?, jackpots = jackpots + ? WHERE user_id = ?',
[win, jackpot, userId],
function (err) {
if (err) throw err
})
This query works fine when I use .query . Now I want to use prepared statement and encounter the problem that .execute does not execute the query and I get no error either.
win, jackpot is 0 or 1, userID is a user id from discord
All reactions