(PECL mongo >=0.9.0)
MongoDB::drop — Drops this database
This drops the database currently being used.
This is identical to running:
<?php
public function drop() {
$this->command(array("dropDatabase" => 1));
}
?>
Questa funzione non contiene parametri.
Returns the database response.
Example #1 MongoDB::drop() example
This example demonstrates how to drop a mongo database and the response to expect.
<?php
$db = $mongo->foo;
$response = $db->drop();
print_r($response);
?>
Il precedente esempio visualizzerĂ qualcosa simile a:
Array ( [dropped] => foo.$cmd [ok] => 1 )