PHP code example of boofw / mongo-pdo
1. Go to this page and download the library: Download boofw/mongo-pdo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
boofw / mongo-pdo example snippets
$mongoClient = new MongoClient('mongodb://127.0.0.1');
$collection = $mongoClient->selectCollection('myDB', 'myTable');
$pdo = new PDO('mysql:host=localhost;dbname=myDB', 'username', 'password');
$collection = new \Boofw\MongoPDO\Collection($pdo, 'myTable');