** help me it's not working. ejs form for sending student roll number to MongoDB fetch individual student result by roll number**
<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>
**nodejs code for fetch student result by roll number I can't able get it plz help how to fix it **
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);
}
},
Mongodb errors show on terminal
MongooseError: Query was already executed: result.find({ rollno: 987625 }) at model.Query._wrappedThunk [as _find]