svn: /phpdoc/en/trunk/reference/mongo/mongocollection/ find.xml

From: Date: Thu, 29 Dec 2011 15:29:03 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/mongocollection/ find.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9303@lists.php.net to get a copy of this message
derick Thu, 29 Dec 2011 15:29:03 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=321514 Log: Explain fields for querying and return a bit better. Also add a warning for the "$" issue. Changed paths: U phpdoc/en/trunk/reference/mongo/mongocollection/find.xml Modified: phpdoc/en/trunk/reference/mongo/mongocollection/find.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/find.xml 2011-12-29 15:12:34 UTC (rev 321513) +++ phpdoc/en/trunk/reference/mongo/mongocollection/find.xml 2011-12-29 15:29:03 UTC (rev 321514) @@ -26,8 +26,19 @@ </term> <listitem> <para> - 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 + <link xlink:href="&url.mongodb.dochub.find;">find</link> is a good idea. </para> + <warning> + <para> + Please make sure that for all special query operaters (starting with + <literal>$</literal>) you use single quotes so that PHP doesn't try to + replace <literal>"$exists"</literal> with the value of the variable + <literal>$exists</literal>. + </para> + </warning> </listitem> </varlistentry> <varlistentry> @@ -36,7 +47,9 @@ </term> <listitem> <para> - Fields of the results to return. + Fields of the results to return. The array is in the format + <literal>array('fieldname' => true, 'fieldname2' => true)</literal>. + The <literal>_id</literal> field is always returned. </para> </listitem> </varlistentry>

« previous php.doc.cvs (#9303) next »