请问数据库查询where时候的大于条件怎么查询?
发布于 5 年前 作者 isu 2537 次浏览 来自 问答

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”)

}

})

这样也不行

1 回复

const _ = db.command_.gt

回到顶部