Voting

: three plus five?
(Example: nine)

The Note You're Voting On

yatiny3007 at gmail dot com
8 years ago
Find By _id

$mongo = new \MongoDB\Driver\Manager('mongodb://root:[email protected]/db');

$id = new \MongoDB\BSON\ObjectId("588c78ce02ac660426003d87");
$filter = ['_id' => $id];
$options = [];

$query = new \MongoDB\Driver\Query($filter, $options);
$rows = $mongo->executeQuery('db.collectionName', $query);

foreach ($rows as $document) {
pr($document);
}

<< Back to user notes page

To Top