PHP Doku:: Drops this database - mongodb.drop.html

Verlauf / Chronik / History: (4) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenMongoDB Native DriverCore ClassesThe MongoDB classMongoDB::drop

Ein Service von Reinhard Neidl - Webprogrammierung.

The MongoDB class

<<MongoDB::createDBRef

MongoDB::dropCollection>>

MongoDB::drop

(PECL mongo >=0.9.0)

MongoDB::dropDrops this database

Beschreibung

public array MongoDB::drop ( void )

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the database response.

Beispiele

Beispiel #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);

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Array
(
    [dropped] => foo.$cmd
    [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",...)