收藏
回答

请问数据库查询where时候的大于条件怎么查询?

db.where({


cpu:gt(50)

}).count({

success: function (res) {

console.log("333")

console.log("cpu">1000000, res.total)

console.log("ok")

}

})

查询cpu大于50的总报错

gt is not defined; [Component] Event Handler Error @ pages/index/index#bound button1click

ReferenceError: gt is not defined

只查询名字的话可以

db.where({


cpu:_.gt(1)

}).count({

success: function (res) {

console.log("333")

console.log("cpu">1000000, res.total)

console.log("ok")

}

})



这样也不行

最后一次编辑于  2019-12-13
回答关注问题邀请回答
收藏

1 个回答

  • 邓坤力
    邓坤力
    2019-12-16

    const _ = db.command _.gt

    2019-12-16
    有用
    回复
登录 后发表内容
问题标签