# install# follow the `PHP tutorial`pecl install mongodb # take care, use 'mongodb', not 'mongo'composer require mongodb/mongodb# new$mongoDbClient = new MongoDbClient();$mongoDbClient->connect()->selectDataBase("xxx")->selectCollection("xxx");# search$collection = $mongoDbClient->getCollection(); // 使用 mongodb 官方 PHP library 中的方法$collection->find();$mongoDbClient->find(); // MongoDbClient.php 封装的方法$mongoDbClient->findById();# search condition$where = [];$where['status'] = 'checked'; // 相等if ($s...
阅读全文