I work with mongodb and i have a simple request to do. I use "find" and i want to limit the result it gets. I have seen the functions "skip" and "limit" of MongoCursor but i want to use the $limit and $skip properties in the query and not with the cursor to limit the data returned.
In the mongodb documentation that seems possible but my request return nothing if I try like this :
$myMongoDB->myCollection->find(array('type' => 'test', '$limit' => 10);
Or :
$myMongoDB->myCollection->find(array('$query' => array('type' => 'test'), '$limit' => 10);
Anyone could help me to see what i do wrong ?
Thank's for help.
PS : and sorry for the quality of my english...