downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoCollection::ensureIndex> <MongoCollection::deleteIndexes
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoCollection::drop

(PECL mongo >=0.9.0)

MongoCollection::dropDrops this collection

Beschreibung

public array MongoCollection::drop ( void )

Drops this collection and deletes its indices.

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
)


add a note add a note User Contributed Notes MongoCollection::drop
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites