MongoCollection::drop
Drops this collection
Beschreibung
public array MongoCollection::drop
( void
)
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
Returns the database response.
Beispiele
Beispiel #1 MongoCollection::drop example
This example demonstrates how to drop a collection and the response to expect.
<?php
$collection = $mongo->my_db->articles;
$response = $collection->drop();
print_r($response);
?>
Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:
Array
(
[nIndexesWas] => 1
[msg] => all indexes deleted for collection
[ns] => my_db.articles
[ok] => 1
)