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
I'm using sqlstring.escape() to escape unpredicted input, this function wraps the input with quotes '' which is causing node mysql driver to throw ER_PARSE_ERROR.
mysql server version: 8.0.23-0ubuntu0.20.04.1
sqlstring version: 2.3.2
Here is a code example:
letsqlstring=require("sqlstring")letquery="CREATE DATABASE IF NOT EXISTS ?;"letinput="my_new_db"query=sqlstring.format(query,input)// turns into "CREATE DATABASE IF NOT EXISTS 'my_new_db';"sqldriver.query(query)// Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_new_db'' at line 1
Thank you.
The text was updated successfully, but these errors were encountered:
I'm using sqlstring.escape() to escape unpredicted input, this function wraps the input with quotes '' which is causing node mysql driver to throw ER_PARSE_ERROR.
mysql server version: 8.0.23-0ubuntu0.20.04.1
sqlstring version: 2.3.2
Here is a code example:
Thank you.
The text was updated successfully, but these errors were encountered: