Added a helpful comment regarding expressions.

This commit is contained in:
Taylor Otwell 2011-11-18 14:50:11 -06:00
parent 193396506e
commit e55f9e9fad
1 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,9 @@ public function first($sql, $bindings = array())
*/
public function query($sql, $bindings = array())
{
// Since expressions are injected into the query as raw strings, we need
// to remove them from the array of bindings. They are not truly bound
// to the PDO statement as named parameters.
foreach ($bindings as $key => $value)
{
if ($value instanceof Expression) unset($bindings[$key]);