MongoDB::drop

(PECL mongo >=0.9.0)

MongoDB::dropDrops this database

Описание

public array MongoDB::drop ( void )

This drops the database currently being used.

This is identical to running:

<?php

public function drop() {
    
$this->command(array("dropDatabase" => 1));
}

?>

Список параметров

У этой функции нет параметров.

Возвращаемые значения

Returns the database response.

Примеры

Пример #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);

?>

Результатом выполнения данного примера будет что-то подобное:

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

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ