MongoDB::drop
(PECL mongo >=0.9.0)
MongoDB::drop — Drops 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.
예제
Example #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
)
There are no user contributed notes for this page.
