MongoGridFS::remove
(PECL mongo >=0.9.0)
MongoGridFS::remove — Removes files from the collections
Description
public bool MongoGridFS::remove
([ array
$criteria
= array()
[, array $options
= array()
]] )Parameters
-
query
-
The filename or criteria for which to search.
-
options
-
Options for the remove. Valid options are:
"w"
See Write Concerns. The default value for MongoClient is 1.
Return Values
Returns if the removal was successfully sent to the database.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- MongoDB
- Классы GridFS
- Функция MongoGridFS::__construct() - Creates new file collections
- Функция MongoGridFS::delete() - Delete a file from the database
- Функция MongoGridFS::drop() - Drops the files and chunks collections
- Функция MongoGridFS::find() - Queries for files
- Функция MongoGridFS::findOne() - Returns a single file matching the criteria
- Функция MongoGridFS::get() - Retrieve a file from the database
- Функция MongoGridFS::put() - Stores a file in the database
- Функция MongoGridFS::remove() - Removes files from the collections
- Функция MongoGridFS::storeBytes() - Stores a string of bytes in the database
- Функция MongoGridFS::storeFile() - Stores a file in the database
- Функция MongoGridFS::storeUpload() - Stores an uploaded file in the database
Коментарии
To ensure that a remove occurred successfully use MongoDB::lastError(). Currently MongoGridFS::remove will return even if the remove failed.