To ensure that a remove occurred successfully use MongoDB::lastError(). Currently MongoGridFS::remove will return even if the remove failed.
MongoGridFS::remove
(PECL mongo >=0.9.0)
MongoGridFS::remove — ファイルをコレクションから削除する
説明
public bool MongoGridFS::remove
([ array
$criteria = array()
[, array $options = array()
]] )パラメータ
-
query -
探したいファイル名あるいは条件。
-
options -
削除時のオプション。以下のオプションが使えます。
-
"safe"
削除に成功したかどうかをチェックします。
-
返り値
削除がデータベースに正しく送信されたかどうかを返します。
fhagard at lightcube dot us
08-Apr-2010 03:58
