MongoDB
PHP Manual

MongoDB::drop

(PECL mongo >=0.9.0)

MongoDB::dropDrops this database

Opis

public array MongoDB::drop ( void )

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

Returns the database response.

Przykłady

Przykład #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);

?>

Powyższy przykład wyświetli coś podobnego do:

Array
(
    [dropped] => foo.$cmd
    [ok] => 1
)

MongoDB
PHP Manual