Skip to content

Commit

Permalink
cleaned up php note
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Seguin committed Feb 29, 2012
1 parent 7f68e92 commit 529a651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/mongodb.markdown
Expand Up @@ -246,7 +246,7 @@ You'd likely expect to find all of your precious unicorns to be vaccinated. To g
### In This Chapter ###
This chapter concluded our introduction to the basic CRUD operations available against a collection. We looked at `update` in detail and observed three interesting behaviors. First, unlike an SQL update, MongoDB's `update` replaces the actual document. Because of this the `$set` modifier is quite useful. Secondly, `update` supports an intuitive `upsert` which is particularly useful when paired with the `$inc` modifier. Finally, by default, `update` only updates the first found document.

Do remember that we are looking at MongoDB from the point of view of its shell. The driver and library you use could alter these default behaviors or expose a different API. For example, the Ruby driver merges the last two parameters into a single hash: `{:upsert => false, :multi => false}`. Similar situation with the PHP driver, where update command accepts the third parameter as array: `array('upsert' => false, 'multiple' => false, '...')`.
Do remember that we are looking at MongoDB from the point of view of its shell. The driver and library you use could alter these default behaviors or expose a different API. For example, the Ruby driver merges the last two parameters into a single hash: `{:upsert => false, :multi => false}`. Similarly, the PHP driver, merges the last two parameters into an array array: `array('upsert' => false, 'multiple' => false)`.

\clearpage

Expand Down

0 comments on commit 529a651

Please sign in to comment.