拥有带有一些字段的mysql数据库
con.query(
'SELECT rk_individual_id FROM `valid_users` WHERE `login` = ? ',
["ya010156gmv"],
function(err,result){
if (err) {
console.log('db fetch error',error);
throw err;
}
else{
console.log(result)
var rk_individual_id = result.rk_individual_id
console.log(rk_individual_id)
}
console.log(结果(
[
TextRow { rk_individual_id: '9061085e-b0fb-11e4-b5d2-2c768a534abf' }
]
结果保存未定义
您可以在result[0]中获得值。rk_individeal_id