云数据库where条件update不更新?

小程序 文章 2022-01-29 10:00 424 0 全屏看文

AI助手支持GPT4.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

回答:

Weldon:

试试把where里面的条件只留一个

陈宇明:

查询到结果了吗?

Mr.Zhao:

先get看看

-EOF-

AI助手支持GPT4.0