mongodb数组子集查询
阿神
阿神 2017-04-24 09:13:23
0
2
528


'user_name':'xiaoming',
'books':['java','c++','php','python','js','html','android']

查询的时候,怎么只返回books数组中,'c++'后面的3个元素?

阿神
阿神

闭关修行中......

reply all(2)
迷茫

"The Definitive Guide to MonogDB" Second Edition 61 pages
It is recommended to read more books

迷茫

db.test.find({},{"books":{"$slice":[2,3]}})

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!