Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

595
Views
Nodejs MySQL ER_PARSE_ERROR al insertar consulta error no: 1064
app.post('', (req, res) => { pool.getConnection((err, connection) => { if (err) throw err console.log('connected as id' + connection.threadID) const params = req.body; connection.query('INSERT INTO beers SET ?', [params], (err, rows) => { connection.release() if (!err) { res.send('Successfully added record of name' + params.name) } else { console.log(err) } }) console.log(req.body) }) })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No estoy seguro de qué tipo de biblioteca está utilizando para comunicarse con la base de datos, pero creo que debería verse más como

 connection.query('INSERT INTO beers(someColumn, someOtherColumn) VALUES (?,?)', [params.valueOfSomeColumn, params.valueOfSomeOtherColumn],...blabla the rest)
  1. Parece que está mezclando las declaraciones INSERT y UPDATE. INSERT no usa SET
  2. Por lo general, este tipo de bibliotecas DB básicas conectan el ? caracteres con el valor de una matriz
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!