PHP Doku:: Repairs and compacts this database - mongodb.repair.html

Verlauf / Chronik / History: (6) anzeigen

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

Ein Service von Reinhard Neidl - Webprogrammierung.

The MongoDB class

<<MongoDB::prevError

MongoDB::resetError>>

MongoDB::repair

(PECL mongo >=0.9.0)

MongoDB::repairRepairs and compacts this database

Beschreibung

public array MongoDB::repair ([ bool $preserve_cloned_files = FALSE [, bool $backup_original_files = FALSE ]] )

Parameter-Liste

preserve_cloned_files

If cloned files should be kept if the repair fails.

backup_original_files

If original files should be backed up.

Rückgabewerte

Returns db response.

Siehe auch

MongoDB core docs on » repair.

Beispiele

Beispiel #1 MongoDB::repair() example

This example demonstrates how to repare and compact a database.

<?php

$db 
$mongo->foo;

$response $db->repair();
print_r($response);

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Array
(
    [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",...)