Skip to content

Commit 4fcfaf5

Browse files
committed
code edit
1 parent c6c03cb commit 4fcfaf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/includes/aggregation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
$uri = getenv('MONGODB_URI') ?: throw new RuntimeException('Set the MONGODB_URI variable to your Atlas URI that connects to the sample dataset');
55
$client = new MongoDB\Client($uri);
66

7-
$collection = $client->sample_restaurants->restaurants;
7+
$db = $client->sample_restaurants;
8+
$collection = $db->restaurants;
89

910
// Retrieves documents with a cuisine value of "Bakery", groups them by "borough", and
1011
// counts each borough's matching documents

0 commit comments

Comments
 (0)