Skip to content

Commit

Permalink
Expand documentation on placeholder binding.
Browse files Browse the repository at this point in the history
Refs #8682
  • Loading branch information
markstory committed Apr 22, 2016
1 parent 623e662 commit 1d388ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Database/Query.php
Expand Up @@ -1685,8 +1685,14 @@ public function traverseExpressions(callable $callback)
*
* If type is expressed as "atype[]" (note braces) then it will cause the
* placeholder to be re-written dynamically so if the value is an array, it
* will create as many placeholders as values are in it. For example "string[]"
* will create several placeholders of type string.
* will create as many placeholders as values are in it. For example:
*
* ```
* $query->bind(':id', [1, 2, 3], 'int[]');
* ```
*
* Will create 3 int placeholders. When using named placeholders, this method
* requires that the placeholders include `:` e.g. `:value`.
*
* @param string|int $param placeholder to be replaced with quoted version
* of $value
Expand Down

0 comments on commit 1d388ea

Please sign in to comment.