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::dropコレクションを削除する

説明

public array MongoCollection::drop ( void )

コレクションと、そのインデックスを削除します。

パラメータ

この関数にはパラメータはありません。

返り値

データベースの応答を返します。

例1 MongoCollection::drop() の例

この例は、コレクションを削除する方法とその応答を示します。

<?php

$collection 
$mongo->my_db->articles;
$response $collection->drop();
print_r($response);

?>

上の例の出力は、 たとえば以下のようになります。

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