Copy Code code as follows:
<?php
Field Word string
$querys = Array ("name" => "Shian");
The number is equal to how many
$querys = Array ("number" =>7);
How much is the value?
$querys = Array ("Number" =>array (' $gt ' => 5));
The number is greater than the amount of
$querys = Array ("Number" =>array (' $gte ' => 2));
The value is less than how much
$querys = Array ("Number" =>array (' $lt ' => 5));
The number is less than what is equal.
$querys = Array ("Number" =>array (' $lte ' => 2));
What is the number of numbers?
$querys = Array ("Number" =>array (' $gt ' => 1, ' $lt ' => 9));
Numbers are not equal to a value
$querys = Array ("Number" =>array (' $ne ' => 9));
Use JS to check the conditions
$js = "function () {
return This.number = = 2 && this.name = = ' Shian ';
}";
$querys = Array (' $where ' => $js);
What values are in the fields
$querys = Array ("Number" =>array (' $in ' => Array (1,2,9));
The margin is not equal to which values
$querys = Array ("Number" =>array (' $nin ' => Array (1,2,9));
Using the regular search
$querys = Array ("name" => new Mongoregex ("/shi/$i"));
Or
$querys = Array (' $or ' => Array (' number ' =>2), Array (' number ' =>9));
?>