PHP & MongoDB – Useful Resources The following resources contain additional information on PHP and MongoDB. Please use them to get more in-depth knowledge on this topic. Useful Links on PHP and MongoDB − MongoDB”s official website for its latest docs and updates. − Wikipedia Reference for MongoDB. − Class documentation and examples Useful Books […]
Category Archives: php Mongodb
PHP & MongoDB – Overview PHP developer team has provided MongoDB Driver for PHP and have various resources available for it. First step in connecting to MongoDB using PHP is to have mongodb PHP driver dll in php ext directory and enable it in php.ini and then use mongodb API to connect to the database. […]
PHP & MongoDB – Drop Collection First step to do any operation is to create a Manager instance. // Connect to MongoDB using Manager Instance $manager = new MongoDBDriverManager(“mongodb://localhost:27017”); Second step is to prepare and execute a command to drop the collection. // Create a Command Instance $createCollection = new MongoDBDriverCommand([“drop” => “sampleCollection”]); // Execute […]