使用express框架和mongoose在MongoDB更新数据

update方法  modelName.update({需要替换的内容},{“$set”:{新的内容}},function(err,doc){});

User.update({userName:"zs"},{"$set":{userName:"ls"}},function(err,doc){});
上一篇:初入IT行業,走出自我


下一篇:windows下安装php笔记