Copy codeThe Code is as follows:
<? Php
// The delimiter string is
$ Querys = array ("name" => "shian ");
// Number of equal values
$ Querys = array ("number" => 7 );
// How much is the data size?
$ Querys = array ("number" => array ('$ gt' => 5 ));
// The value is equal to or greater
$ Querys = array ("number" => array ('$ gte' => 2 ));
// What is the value smaller
$ Querys = array ("number" => array ('$ lt' => 5 ));
// The number is less than equal
$ Querys = array ("number" => array ('$ lte' => 2 ));
// Number of data values
$ Querys = array ("number" => array ('$ gt' => 1, '$ lt' => 9 ));
// The data value is not equal to a value.
$ Querys = array ("number" => array ('$ nee' => 9 ));
// Use js to check the condition
$ Js = "function (){
Return this. number = 2 & this. name = 'shian ';
}";
$ Querys = array ('$ where' => $ js );
// Which values are equal to the memory bit?
$ Querys = array ("number" => array ('$ in' => array (1, 2, 9 )));
// Which values are not supported by the delimiter?
$ Querys = array ("number" => array ('$ nin' => array (, 9 )));
// Use the regular query statement
$ Querys = array ("name" => new MongoRegex ("/shi/$ I "));
// Or
$ Querys = array ('$ or' => array ('number' => 2), array ('number' => 9 )));
?>