why1
V2EX  ›  问与答

rockmongo 里执行成功,自己的 php 代码里却不行

  •  
  •   why1 · Feb 1, 2016 · 2315 views
    This topic created in 3789 days ago, the information mentioned may be changed or developed.

    查找长度大于 5 的文档
    rockmongo 成功执行: array('$where' => 'this.name.length < 5')

    php 里:$cursor = $collection->find(array('name' => array ( '$where' => 'this.name.length < 5')));
    执行: localhost:27017: invalid operator: $where
    改:$cursor = $collection->findAll
    执行: Fatal error: Call to undefined method MongoCollection::findAll()

    但 rockmongo 日志是这个 findAll 的啊
    'limit' => '0',
    'pagesize' => '10',
    'command' => 'findAll',
    )

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2701 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:23 · PVG 22:23 · LAX 07:23 · JFK 10:23
    ♥ Do have faith in what you're doing.