有人知道编写php-mongo查询的语法NOT NULL吗?
当我查询时,我知道如何执行此操作NULL:
<?php
$cursor = $collection->find(array("someField" => null));
Run Code Online (Sandbox Code Playgroud)
这甚至可能吗?
jjm*_*jjm 17
是的,你想要$ne操作员,所以
$cursor = $collection->find(array("someField" => array('$ne' => null)));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12773 次 |
| 最近记录: |