因为返回的是个对象
var selectSql1="select * from spc_word_mst where WORD_ID=? limit 0,1 "
var selectSql2="select * from spc_baitai_mst where BAITAI_ID=? limit 0,1"
//SPC_Result_JH
var insertsql="insert into";
var key1=‘001‘;
var key2=‘001‘;
conn.query(selectSql1,[key1],function(error,rows){
if(error) console.log(error)
console.log("select==>");
var wordname=new String(rows[0].WORD_NAME);//取得字段值
console.log(wordname);
conn.query(selectSql2,[key2],function(error1,rows){
if(error1) console.log(error1)
console.log("select==>");
var url=new String(rows[0].BAITAI_URL);//取得字段值
console.log(url);
});
});
原文:http://www.cnblogs.com/c-x-a/p/5462180.html