From e4b8dac39a823189ee14d0dbceb7f136cc312f00 Mon Sep 17 00:00:00 2001 From: Josue Balbuena Date: Tue, 13 Jun 2017 18:52:09 -0500 Subject: [PATCH] Fixing when getting distinct rows --- src/SQLAnywhereConnection.php | 2 +- src/SQLAnywhereConnector.php | 2 +- src/SQLAnywhereQueryGrammar.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SQLAnywhereConnection.php b/src/SQLAnywhereConnection.php index 9099f3b..4de3645 100644 --- a/src/SQLAnywhereConnection.php +++ b/src/SQLAnywhereConnection.php @@ -11,4 +11,4 @@ protected function getDefaultQueryGrammar() { protected function getDefaultSchemaGrammar() { return $this->withTablePrefix(new SQLAnywhereSchemaGrammar); } -} +} \ No newline at end of file diff --git a/src/SQLAnywhereConnector.php b/src/SQLAnywhereConnector.php index 55414bc..ccf53e1 100644 --- a/src/SQLAnywhereConnector.php +++ b/src/SQLAnywhereConnector.php @@ -15,4 +15,4 @@ public function connect(array $config) { return $connection; } -} +} \ No newline at end of file diff --git a/src/SQLAnywhereQueryGrammar.php b/src/SQLAnywhereQueryGrammar.php index 1245a3d..5958e01 100644 --- a/src/SQLAnywhereQueryGrammar.php +++ b/src/SQLAnywhereQueryGrammar.php @@ -35,7 +35,7 @@ protected function compileAggregate(Builder $query, $aggregate) { } protected function compileColumns(Builder $query, $columns) { if ( ! is_null($query->aggregate)) return; - $select = $query->distinct ? 'distinct' : ''; + $select = $query->distinct ? 'distinct ' : ''; return $select.$this->columnize($columns); } protected function compileLimit(Builder $query, $limit) { @@ -44,4 +44,4 @@ protected function compileLimit(Builder $query, $limit) { protected function compileOffset(Builder $query, $offset) { return 'start at '.((int) $offset + 1); } -} +} \ No newline at end of file