Home > Database > Mysql Tutorial > MongoDB的查询

MongoDB的查询

WBOY
Release: 2016-06-07 17:56:11
Original
1031 people have browsed it

1.多查询条件 向查询文档加入多个键/值对的方式可以实现多个查询条件的组合。例如要查询所有用户名为joe且年龄为27岁的用户,可以像下面这样: 1 db.users.find({username : joe, age : 27})

1.多查询条件

向查询文档加入多个键/值对的方式可以实现多个查询条件的组合。例如要查询所有用户名为“joe”且年龄为27岁的用户,香港服务器,美国服务器,可以像下面这样:

1 >db.users.find({“username” : “joe”, “age” : 27}) ,香港虚拟主机

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template