.execute not working #1600
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 |
Beta Was this translation helpful? Give feedback.
-
when i make 'UPDATE slot_stats SET total_games = total_games + 1 WHERE user_id = ?;' |
Beta Was this translation helpful? Give feedback.
-
what do you get in the response? do you see |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions