From dec523a7dbb856c32319f2ad843e6faf7d7b5cfe Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 29 Dec 2011 15:29:03 +0000 Subject: [PATCH] Explain fields for querying and return a bit better. Also add a warning for the "$" issue. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321514 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocollection/find.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/reference/mongo/mongocollection/find.xml b/reference/mongo/mongocollection/find.xml index 53049d96bf..0e972f5bfc 100644 --- a/reference/mongo/mongocollection/find.xml +++ b/reference/mongo/mongocollection/find.xml @@ -26,8 +26,19 @@ - The fields for which to search. + The fields for which to search. MongoDB's query language is quite + extensive. The PHP driver will in almost all cases pass the query + straight through to the server, so reading the MongoDB core docs on + find is a good idea. + + + Please make sure that for all special query operaters (starting with + $) you use single quotes so that PHP doesn't try to + replace "$exists" with the value of the variable + $exists. + + @@ -36,7 +47,9 @@ - Fields of the results to return. + Fields of the results to return. The array is in the format + array('fieldname' => true, 'fieldname2' => true). + The _id field is always returned.