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

212
Views
El recuento de columnas MYSQL no coincide con el recuento de valores en la fila 1 nodejs

Sé que hay muchas preguntas como esta, pero realmente no sé qué está mal. Tengo una tabla con 4 columnas (Id, teacherId, class, AssistanceRecord). La columna Id se incrementa automáticamente. Este es el back-end:

 app.post("/api/attendanceRecord", async(req, res) => { const students = req.body.students const className = req.body.className const teacherId = req.body.teacherId connection.query( "INSERT INTO attendance(teacherId, class, attendanceRecord) VALUES(?,?,?)", [teacherId, className, students], (err, result) => { if (result){ res.send({ message: result }) } if (err){ res.send({ message: err }) console.log(err) } } ) })

Esta es la parte delantera:

 const updateAbsent = () => { Axios.post("http://localhost:1337/api/attendanceRecord", { teacherId: teacherId, className: className, students: students }).then((response) => { if(response){ console.log(response) } else{ console.log("error") } }) }

mesa de asistencia:

 CREATE TABLE attendance( ID INT auto_increment, teacherId INT, class varchar(255), attendanceRecord VARCHAR(1000), PRIMARY KEY(ID) );

Cualquier ayuda sería apreciada

about 4 years ago · Juan Pablo Isaza
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!