My code
stmt.bind({$ticket:"ABCD1245"});
while (stmt.step()) console.log(stmt.get());
gives a result like [1], that is correct
stmt.bind({$ticket:"ABCD1245a"});
while (stmt.step()) console.log(stmt.get());
gives no result at all, which is ok, because no record exist.
How do i detect if no record was found, i tried like stmt.numrows, but looks like thats not supported.
I fixed it this way, would like to use stmt.num_rows
ticket= "ABCD1245A";
stmt.bind({$ticket:ticket});
if(stmt.step()){
console.log(stmt.get());
console.log(ticket+' found');
while (stmt.step()) console.log(stmt.get());
}else{
console.log('No result for '+ticket);
}