PHP Doku:: Drops this collection - mongocollection.drop.html

Verlauf / Chronik / History: (11) anzeigen

Sie sind hier:
Doku-Startseite ≥ PHP-Handbuch ≥ Funktionsreferenz ≥ Datenbankerweiterungen ≥ Anbieterspezifische Datenbankerweiterungen ≥ MongoDB Native Driver ≥ Core Classes ≥ The MongoCollection class ≥ MongoCollection::drop

Ein Service von Reinhard Neidl - Webprogrammierung.

The MongoCollection class

<<MongoCollection::deleteIndexes

MongoCollection::ensureIndex>>

MongoCollection::drop

(PECL mongo >=0.9.0)

MongoCollection::drop — Drops 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
)

Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)