0
數組我有一個MongoDB的設置,像這樣:PHP MongoDB的查詢與未知的關鍵
fieldName: {
"1": {
client: "name-here",
subfield: "more-junk-here"
},
"2": {
client: "another-client-name-here",
subfield: "more-data"
},
"3": {
client: "client-num-3",
subfield: "i-like-turkey-sandwiches"
}
}
如何查詢「我樣火雞三明治」,不知道這是在第3位,而沒有搜索整個文檔?我開始寫這一點,但我完全難倒如何做搜索...
$cursor = $collection->findOne(array('fieldName' => 'i-like-turkey-sandwiches));