微信小程序云开发-数据库-查询满足条件的数据

一、查询价格大于10的商品

1.wxml文件

 

 2.js文件

where条件语句:.where({price:db.command.gt(10)}) 

 

 3.查询结果

 

 

 二、查询价格大于等于10的商品

js文件,where条件语句:.where({price:db.command.gte(10)}) 

 

 三、查询价格小于10的商品

js文件,where条件语句:.where({price:db.command.lt(10)}) 

 

 

 四、查询价格小于等于10的商品

js文件,where条件语句:.where({price:db.command.lte(10)}) 

 

 五、查询价格等于10的商品

js文件,where条件语句:.where({price:db.command.eq(10)}) 

 

 六、查询价格大于5小于10的商品

js文件,where条件语句:.where({price:monica.gt(5)&&monica.lt(10)}) 

 

 

posted @ 2021-07-15 14:41  AnnLing  阅读(3084)  评论(1)    收藏  举报