I use query.on('row') to get the result.But if the result is empty,then how can I know it?
Because NodeJS is Asynchronous execution,I can't just write as this:
db.query("").on('row',function(r){
});
res.write('error');
So what I should do instead of?
I use query.on('row') to get the result.But if the result is empty,then how can I know it?
Because NodeJS is Asynchronous execution,I can't just write as this:
db.query("").on('row',function(r){
});
res.write('error');
So what I should do instead of?