云数据库上test{openid:xxxx,name:张三,age:30},
return await db.collection('test').where({
openid:event.openid,
name:event.name,
})
.update({
data:{
age:event.age,
}
})
结果更新不成功,event各项用return看过,都有值,且openid有对应数据,结果就是无法更新,result显示update为0
云数据库where条件update不更新?Does the cloud database where condition update not update?
云数据库where条件update不更新?云数据库上test{openid:xxxx,name:张三,age:30},
return await db.collection('test').where({
openid:event.openid,
name:event.name,
})
.update({
data:{
age:event.age,
}
})
结果更新不成功,event各项用return看过,都有值,且openid有对应数据,结果就是无法更新,result显示update为0
Test {openid: XXXX, name: Zhang San, age: 30}, return await dB collection('test'). where({ openid:event.openid, name:event.name, }) . Update ({data: {age: event. Age,}}) the result is not updated successfully. All event items are read with return and have values, and openid has corresponding data. The result is that they cannot be updated. The result shows that update is 0
回答:
查询到结果了吗?
先get看看
试试把where里面的条件只留一个