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

209
Views
no puedo obtener el resultado del estudiante por número de registro de mongodb número de registro enviado desde el formulario ejs

** ayúdame, no funciona. formulario ejs para enviar el número de registro del estudiante a MongoDB obtener el resultado del estudiante individual por número de registro **

 <section> <div> <form action="/result"> <label for="rollno">your Roll Number</label> <input type="number" name="rollno" placeholder="enter your roll number"> <button id="btn" type="submit">submit</button> </form> <br> <hr> <% if(details!=null) { %> <table class="table table-striped"> <thead> <tr> <th scope="col">Roll No</th> <th scope="col">Name</th> <th scope="col">Email</th> <th scope="col">Phone</th> <th scope="col">Result</th> </tr> </thead> <% details.forEach(function(item) { %> <tbody> <tr> <th scope="row"><%= item.rollno %></th> <td><%= item.name %></td> <td><%= item.email %></td> <td><%= item.phone %></td> <td><%= item.result %></td> </tr> </tbody> <% }) %> </table> <% } else { %> <h4>Enter your phone number for result</h4> <% }%> </div> </section>

** código de nodejs para obtener el resultado del estudiante por número de rollo. No puedo obtenerlo, por favor ayuda a solucionarlo **

 async result(req,res){ try{ await studentResult.find({rollno: '987625'},function(err,allDetails){ if(err){ console.log(err); }else { //console.log(allDetails) res.render('result',{details: allDetails}) } }) }catch (e){ console.log(e); } },

Los errores de Mongodb se muestran en la terminal

MongooseError: la consulta ya se ejecutó: result.find ({rollno: 987625}) en model.Query._wrappedThunk [como _find]

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!