You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REPLACE INTO ?? (??) VALUES (?) not working due array literals not escaped
Running the statement above does not work (error is below). I found out that it is the very last question mark of the query that doesn't work: if I flatten only the last value array and use multiple question marks then it works. Presumably the values are not escaped.
Sorry I'm working through the any-db module so not calling mysql directly. As any-db does not do value-escaping and googling the error led me to believe the problem was an unescaped value, I supposed it had to be the underlying mysql module that was at fault. However the following code works, i.e. mysql works fine:
Running the statement above does not work (error is below). I found out that it is the very last question mark of the query that doesn't work: if I flatten only the last value array and use multiple question marks then it works. Presumably the values are not escaped.
Table schema:
Error message:
README.md says: "Arrays are turned into list, e.g. ['a', 'b'] turns into 'a', 'b'."
So I figure it should be possible. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: