希望等待一步操作完成之后,再往下执行为啥这个不行asyncfunctionf(mysql_con){awaitmysql_con.query("select*fromstu_detailwherestu_no=?",['2015130'],asyncfunction(err,result,fields){console.log(result)console.log(q.sql)if(result.length==0){console.log("数据为空");awaitmysql_con.query("insertintostu_detailset?",{stu_no:"2015130"},function(err,result,fields){console.log(a.sql)if(err){console.log(err)}console.log("charu")console.log(result)})}else{awaitmysql_con.query("updatestu_detailset?",{stu_name:"陈翰轩"});}for(vari=0;i//console.log(fields[i]) console.log(fields[i].name)}//pools[0].end();//exitProcess()})mysql_con.end();exitProcess()}
蓝山帝景
qq_花开花谢_0
相关分类