MongoDB
 sql >> Database >  >> NoSQL >> MongoDB

Mongo DB $ o query in PHP

The $or operator lets you use boolean or in a query.
You give $or an array of expressions, any of which can satisfy the query.

Hai fornito un solo elemento nell'array. Usa:

find(array('$or' => array(
  array("brand" => "anti-clothes"),
  array("allSizes" => "small")
)));