它不会变成假的!请帮助我需要将密码的值更改为 false
//password check
{
connection.connect(function(){
connection.query('select * from rencho2.user',function(err,results){
if(results[0].passwd==p){
console.log("correct");
else {
global.verify="false";
console.log("Incorrect. "); //here its false
}
//here its false
});
//here it becomes true -- why??
send = {
"UserName": body.UserName,
"Password": global.verify
}
body1=JSON.stringify(send);
});
});