Category Archives: php Mongodb

Khóa học miễn phí PHP & MongoDB – Create Collection nhận dự án làm có lương

PHP & MongoDB – Create 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 create the collection. // Create a Command Instance $createCollection = new MongoDBDriverCommand([“create” => “sampleCollection”]); // Execute […]

Khóa học miễn phí PHP & MongoDB – Drop Database nhận dự án làm có lương

PHP & MongoDB – Drop Database 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 database. // Create a Command Instance $dropDatabase = new MongoDBDriverCommand([“dropDatabase” => 1]); // Execute […]