Greetings, I have a question about the update method.
TablaPTC.update({compGasto:"si"},{$set: {acumulado: "0"}});
Currently this is my method, and I'm not sure I have to change it to serve.
Greetings, I have a question about the update method.
TablaPTC.update({compGasto:"si"},{$set: {acumulado: "0"}});
Currently this is my method, and I'm not sure I have to change it to serve.
Modify my update method like this:
TablaPTC.update({},{$set:{acumulado: 0}},{multi: true},function(err,result){
if(err){console.log(err)}
})
Adding the part of: ,{multi: true}, function(err,result){
if(err){console.log(err)}
})
It started working.