Skip to content

Commit 509c146

Browse files
committed
more edits
1 parent 4dd9f25 commit 509c146

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/includes/read/distinct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
// Retrieves distinct "name" field values for documents matching the "borough" and "cuisine" fields query
3030
// and attaches a comment to the operation
3131
// start-distinct-with-comment
32-
$options = ['comment' => 'Bronx pizza restaurants'];
3332
$query = ['$and' => [['borough' => 'Bronx'], ['cuisine' => 'Pizza']]];
33+
$options = ['comment' => 'Bronx pizza restaurants'];
3434
$results = $collection->distinct('name', $query, $options);
3535

3636
foreach ($results as $value) {

source/read/distinct.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ and assign the following value to your ``collection`` variable:
4646
To learn how to create a free MongoDB Atlas cluster and load the sample datasets, see the
4747
:atlas:`Get Started with Atlas </getting-started>` guide.
4848

49-
``MongoDB\\Collection::distinct()`` Method
50-
------------------------------------------
49+
``MongoDB\Collection::distinct()`` Method
50+
-----------------------------------------
5151

5252
To retrieve the distinct values for a specified field, call the ``MongoDB\Collection::distinct()``
5353
method and pass in the name of the field you want to find distinct values for.
@@ -111,8 +111,8 @@ all documents that have a ``cuisine`` field value of ``'Italian'``:
111111
Modify Distinct Behavior
112112
~~~~~~~~~~~~~~~~~~~~~~~~
113113

114-
You can modify the behavior of the ``MongoDB\Collection::distinct()`` method by
115-
passing an array that specifies option values. The following table describes some
114+
You can modify the behavior of the ``distinct()`` method by passing an
115+
array that specifies option values. The following table describes some
116116
options you can set to customize the operation:
117117

118118
.. list-table::

0 commit comments

Comments
 (0)