我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

PHP Mongo Query查找空数组

I'm trying to find the empty-array subdocument records from a collection,

In Mongo Shell, below query returns 3 records,

db.test.find({"campaigns.postcode":{"$gt":{}}}).count();

same in PHP returns all the records from test collection,

$mongo->$dbname->$colname->count(array('campaigns.postcode'=>array('$gt'=>array())));

Please anyone can help me !!!

近期文章

  • MAMP Pro Local / Master php.ini值
  • 在PHP中将assac转换为字符串
  • 如何在MySQL中使用子查询优化多个连接的查询
  • 选择后链接输入选项?
  • 如何在布局中访问会话变量
  • 使用PHP使用ID标记提取XML
  • 使用Redis创建通知结构
  • 复选框是否在使用php的2个mysql查询中
  • Codeigniter编写excel文件
  • 如何添加创建窗口extjs4的功能?
  • 如何在php中检测用户中止连接?
  • 如何在foreach内部打开文件(glob ... PHP
  • php mysql,存储过程和事务问题
  • 播放网络音频没声音,再次安装才有声音(同一样的安装包)
  • 如何从多维数组中获取值?
  • 编辑CRUD模板
  • Eclipse Orion PHP插件
  • 当在yii google图表中传递一个数组元素时,它会传递null而不是值
  • 图像上传器使用增量图像名称
  • 使用我的浏览器从PHP读取UDP数据包

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华