国产成人a∨激情视频厨房,国产v亚洲v欧美v精品综合,heyzo高无码国产精品,国产av导航大全精品,成品人视频ww入口

PHP 怎么執(zhí)行mongodb 的 $in 和$size查詢?

假設(shè)有個這樣的集合

{ "_id" : ObjectId("5022518d09248743250688e0"), "name" : "big fruit", "fruits" : [ "apple", "pear", "orange" ] } ,{ "_id" : ObjectId("502251a309248743250688e1"), "name" : "good fruit", "fruits" : [ "banana", "pear", "orange" ] }, { "_id" : ObjectId("502251c109248743250688e2"), "name" : "good fruit", "fruits" : [ "banana", "apple", "tomato" ] }

假設(shè)有這樣的集合

RT 者兩句代碼用PHP怎么寫

db.coll.find({_id:{$in[ ObjectId("502251a3092487432506<愛尬聊_百科詞條>88e1"), ObjectId("502251c109248743250688e2")]}})

查詢長度為三的數(shù)組

db.coll.find({fruits:{$size:0}})

用PHP的話要怎么實現(xiàn)


編輯 舉報 2023-06-19 14:37

0個評論

暫無評論...
驗證碼 換一張
相關(guān)內(nèi)容