如图,我在test中插入了一条数据。然后我用插入的数据作为查询条件,也能查到这条数据:
但是我将一个子项使用 $gte就查不到了
$gte
大家有人知道为什么吗?
认证高级PHP讲师
It should be written like this db.test.find({"o_id.ep":{$gte:34}}) If you write it like that, you are judging that o_id is equal to {c:1,p:5,ep:{$gte:34}}. Obviously there is no such record
db.test.find({"o_id.ep":{$gte:34}})
It should be written like this
db.test.find({"o_id.ep":{$gte:34}})
If you write it like that, you are judging that o_id is equal to {c:1,p:5,ep:{$gte:34}}. Obviously there is no such record