【问题标题】:MongoDB & CodeIgniter: Select where a field existsMongoDB & CodeIgniter:选择字段存在的位置
【发布时间】:2013-05-09 16:56:37
【问题描述】:

我正在使用 Codeigniter 和 MongoDb library。

我想在存在字段的位置执行选择。

db.yourcollection.find({ 'otherInfo.text' : { '$exists' : true }})

但是我找不到如何使用这个库来做到这一点......

请问有什么解决办法吗?

【问题讨论】:

    标签: codeigniter mongodb field


    【解决方案1】:

    这里不是 CI 程序员,但我认为:

    $this->mongo_db->where(array('otherInfo.text'=>array('$exists'=>true)))
    

    会起作用的。

    【讨论】:

    • 嫁给我!非常感谢...!
    猜你喜欢
    • 1970-01-01
    • 2015-07-03
    • 1970-01-01
    • 2013-08-19
    • 2012-01-24
    • 2011-12-04
    • 2011-06-29
    • 1970-01-01
    相关资源
    最近更新 更多