1connectDB.query("SELECT ACCOUNT_ID FROM registration WHERE ACCOUNT_ID = '"+ userAccnt +"'", function(err, result, field){
2 if(result.length === 0){
3 //new user logic
4}else{
5 //existing user, redirect to another page
6 }
7 }