国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

PHP 怎么執(zhí)行mongodb 的 $in 和$size查詢
阿神
阿神 2017-04-11 10:42:36
0
1
184

假設(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("502251a309248743250688e1"), ObjectId("502251c109248743250688e2")]}})

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

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

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

阿神
阿神

閉關(guān)修行中......

reply all(1)
左手右手慢動作

是原生php 還是用了其他ORM模型??梢杂胘enssegers/mongodb 組件composer安裝下 還是比較好的

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template