时间:2021-07-01 10:21:17 帮助过:19人阅读
var userAddSql = ‘INSERT INTO userinfo(id,username,pwd) VALUES(0,?,?)‘; var userAddSql_Params = [‘Wilson‘, 55]; //增 add connection.query(userAddSql,userAddSql_Params,function (err, result) { if(err){ console.log(‘[INSERT ERROR] - ‘,err.message); return; } console.log(‘INSERT ID:‘,result); }); //关闭连接 connection.end();
nodejs+mysql入门实例(增)
标签:info ret node nodejs func highlight nod userinfo var