我有这个结构:
{
"_id": NumberInt(101),
"link_id": {
"125": {
"thumb_position": NumberInt(1),
"last_scan": NumberInt(1234563645),
"row_numb": NumberInt(301),
"clicks": NumberInt(120)
},
"126": {
"thumb_position": NumberInt(2),
"last_scan": NumberInt(-2147483648),
"row_numb": NumberInt(1301),
"clicks": NumberInt(199)
},
{
...
}
}
}
问题是我想通过_id 和link_id 查询。我在 PHP 中尝试过:
$arr_ = array("_id" => intval(101), "link_id" => "125");
$res = $collection->findOne($arr_);
和许多其他变体并没有结果。如果我只搜索 _id 一切正常。有任何想法吗?多谢!!