svn: /phpdoc/en/trunk/reference/mongo/ tutorial.xml
| From: | Peter Cowburn | Date: | Mon, 07 Jul 2014 12:37:41 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongo/ tutorial.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-12583@lists.php.net to get a copy of this message | ||
salathe Mon, 07 Jul 2014 12:37:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=334177
Log:
Fix collection variable name in examples
Patch by Greg Bowler
Changed paths:
U phpdoc/en/trunk/reference/mongo/tutorial.xml
Modified: phpdoc/en/trunk/reference/mongo/tutorial.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/tutorial.xml 2014-07-07 12:27:00 UTC (rev 334176)
+++ phpdoc/en/trunk/reference/mongo/tutorial.xml 2014-07-07 12:37:41 UTC (rev 334177)
@@ -485,7 +485,7 @@
$collection = $connection->database->collectionName;
$query = array( "i" => array( '$gt' => 50 ) ); //note the single quotes
around '$gt'
-$cursor = $coll->find( $query );
+$cursor = $collection->find( $query );
while ( $cursor->hasNext() )
{
@@ -506,7 +506,7 @@
$collection = $connection->database->collectionName;
$query = array( 'i' => array( '$gt' => 20, "\$lte" => 30 )
);
-$cursor = $coll->find( $query );
+$cursor = $collection->find( $query );
while ( $cursor->hasNext() )
{
@@ -536,8 +536,8 @@
$connection = new MongoClient();
$collection = $connection->database->collectionName;
-$coll->ensureIndex( array( "i" => 1 ) ); // create index on "i"
-$coll->ensureIndex( array( "i" => -1, "j" => 1 ) ); // index on
"i" descending, "j" ascending
+$collection->ensureIndex( array( "i" => 1 ) ); // create index on "i"
+$collection->ensureIndex( array( "i" => -1, "j" => 1 ) ); // index on
"i" descending, "j" ascending
?>
]]>
</programlisting>