在使用 php mongodb 搜索时,如果字段类型用 int,则使用 php 搜索时一定要把数值转换成整型来搜索,用字符串类型的数字搜索是没有结果的!!!!

$condition = ['memberCode': intval($memberCode)];
$result = $this->collection->find($condition);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-02-07
猜你喜欢
  • 2022-03-05
  • 2022-12-23
  • 2022-01-27
  • 2021-12-28
  • 2021-10-03
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案