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
Today you need to do it like this.
There must be a better solution that doesn't need getConnection().
const db = require('larvitdb');
db.pool.getConnection(function(err, dbCon) {
const sql = 'SELECT * FROM users WHERE username LIKE ' + dbCon.escapeId(postData);
dbCon.query(sql, function(err, rows) {
dbCon.release(); // Always release your connection when the query is done
if (err)
throw err;
});
});
The text was updated successfully, but these errors were encountered:
lillem4n
changed the title
Add escape-funktion for identifiers
Add escape-function for identifiers
Aug 20, 2018
Today you need to do it like this.
There must be a better solution that doesn't need getConnection().
The text was updated successfully, but these errors were encountered: