我正在使用 Node.JS 进行开发,并且我有这些用 JavaScript 编写的函数:
MySqlBl.prototype.getUser = function (email, onGetUserCompleted, onGetUserError) {
this.execQuery("CALL spGetUser('" + email + "')", onGetUserError, onDone);
function onDone(rows) {
if (typeof rows[0][0] != 'undefined') {
var row = rows[0][0];
console.log('1: ', row.First_Name);
console.log('2: ', row.Last_Name);
getUserObject(row.User_ID, row.Email, row.First_Name, row.Last_Name);
}
}
};
function getUserObject(userID, email, firstName, lastName) {
console.log('3: ' + firstName);
console.log('4: ' + lastName);
}
我得到的输出是:
1: Lien
2: Dang
3: undefined
4: undefined
为什么我不能正确发送行值?