在验证node.js中的密码并将响应发送到android客户端时出现上述错误。
任何人都可以检查我的验证码是否正确?
var queryData = url.parse(request.url, true).query;
var Email = queryData.email;
var Password = queryData.passwd;
ibmdb.open(dbConnection, function(err, conn) {
if (err) {
response.send("error occurred " + err.message);
}
else {
console.log('before select');
conn.query("SELECT PASSWORD FROM USER02130.USER_DETAILS123 WHERE SHORT_ID='"+Email+"'", function(err, rows, moreResultSets) {
if ( !err ) {
var valid = rows.JSON();
if (valid.PASSWORD==Password) {
response.write("Successful login");
}
else {
response.write("Invalid Password");
}
}
else {
response.write("error occurred " + err.message);
}
response.end();
});
}
})