From 100a59c9c4be137f37dafed6d221df391b80d28c Mon Sep 17 00:00:00 2001 From: Andrew Ellis Date: Thu, 3 May 2012 11:16:32 -0600 Subject: [PATCH] added trim() for the sql statement --- laravel/database/connection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/database/connection.php b/laravel/database/connection.php index 751be69e..6584942d 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -175,6 +175,8 @@ public function first($sql, $bindings = array()) */ public function query($sql, $bindings = array()) { + $sql = trim($sql); + list($statement, $result) = $this->execute($sql, $bindings); // The result we return depends on the type of query executed against the @@ -321,4 +323,4 @@ public function __call($method, $parameters) return $this->table($method); } -} \ No newline at end of file +}