(PECL mongo >= 0.8.0)
mongo_remove — Removes documents from a database collection
Removes objects from a database collection based on criteria.
The database connection to use.
The database and collection name
Array of criteria for objects to remove.
If only one object matching the criteria should be removed.
If the remove was successful.
Example #1 mongo_remove() example
In this example, all users named Doug are deleted from the users collection of the www database.
<?php
$rquery = array("username" => "Doug");
$conn = mongo_connect("localhost", true);
if (!$conn) {
die("Could not connect.");
}
$ok = mongo_remove($conn, "www.users", $rquery, false);
?>