From 92f2dbb4fe06ea1dc252fff98f96e2ccf8213905 Mon Sep 17 00:00:00 2001 From: evgen-d Date: Fri, 29 Aug 2014 14:22:24 +0400 Subject: [PATCH] fix offset --- Query.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Query.php b/Query.php index 35c7d23..9aafb6f 100644 --- a/Query.php +++ b/Query.php @@ -357,10 +357,7 @@ class Query extends Component implements QueryInterface { $aql = ''; if ($this->hasLimit($limit)) { - $aql = 'LIMIT ' . $limit; - if ($this->hasOffset($offset)) { - $aql .= ', ' . $offset; - } + $aql = 'LIMIT ' . ($this->hasOffset($offset) ? $offset : '0') . ',' . $limit; } return $aql;