0
I am passing two values of an input to the function "Insert", the values then arriving at the function normally, I am printing them to confirm, but still I can not insert the values passed in the table.
Returns no error, simply does not insert the values.
insert(connection, email, password) {
console.log(email)
console.log(password)
var sql = `INSERT INTO register (email, password) VALUES (${email}, ${password})`
connection.query(sql, function (err, result) {
if (err) {
return ('Falha ao inserir dados!' + err)
}
console.log('Dados inseridos com sucesso!')
})
}
God, it was killing me and it was so simple.
– Tufe