diff --git a/reference/mongo/tutorial.xml b/reference/mongo/tutorial.xml index 9511c852e0..e04be42e87 100644 --- a/reference/mongo/tutorial.xml +++ b/reference/mongo/tutorial.xml @@ -485,7 +485,7 @@ $connection = new MongoClient(); $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 @@ $connection = new MongoClient(); $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 @@ while ( $cursor->hasNext() ) $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 ?> ]]>