Posts by Daniel Campos • 31 points
2 posts
-
1
votes2
answers122
viewsA: array.push() inside mysql.query callback (nodejs)
I managed to settle with: db.connect(async () => { const result = await db.promise().query('SELECT * FROM Users WHERE email = ?', [emailregister]) if (result[0].length) { errors.push({…
-
2
votes2
answers122
viewsQ: array.push() inside mysql.query callback (nodejs)
Hello, I am having a problem adding a custom error in an array of errors, in the validation of a form with nodejs. I’ve tried to change my approach but I haven’t found a solution, //PARTE 1 let…