From e55f9e9fad0f08bcf0f0ba8e9368e4c6853bc1c8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 18 Nov 2011 14:50:11 -0600 Subject: [PATCH] Added a helpful comment regarding expressions. --- laravel/database/connection.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/laravel/database/connection.php b/laravel/database/connection.php index 76f9ae54..e0022e3b 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -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]);