# Update records based on a given criteria

MongoCollection::__toString
MongoCollection::validate
MongoCollection
PHP Manual

# MongoCollection::update

(PECL mongo >=0.9.0)

MongoCollection::update — Update records based on a given criteria

### Beschreibung

public boolean MongoCollection::update ( array `$criteria` , array `$newobj` [, boolean `$upsert`= `FALSE` ] )

### Parameter-Liste

`criteria`

  Description of the objects to update.

`newobj`

  The object with which to update the matching records.

`upsert`

  If $newobj should be inserted if the criteria is not found.

### Rückgabewerte

Returns if the update was successful.

MongoCollection::__toString
MongoCollection::validate
MongoCollection
PHP Manual