From b148291ca24d292b4da2b436a02b8c230cda1677 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 16 Feb 2011 17:48:47 +0100 Subject: [PATCH] DibiDataSource: removed keyword 'AS' --- dibi/libs/DibiDataSource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dibi/libs/DibiDataSource.php b/dibi/libs/DibiDataSource.php index 83e146ab..0b492dbe 100644 --- a/dibi/libs/DibiDataSource.php +++ b/dibi/libs/DibiDataSource.php @@ -264,7 +264,7 @@ class DibiDataSource extends DibiObject implements IDataSource */ public function toFluent() { - return $this->connection->select('*')->from('(%SQL) AS t', $this->__toString()); + return $this->connection->select('*')->from('(%SQL) t', $this->__toString()); } @@ -310,7 +310,7 @@ class DibiDataSource extends DibiObject implements IDataSource if ($this->count === NULL) { $this->count = $this->conds || $this->offset || $this->limit ? (int) $this->connection->nativeQuery( - 'SELECT COUNT(*) FROM (' . $this->__toString() . ') AS t' + 'SELECT COUNT(*) FROM (' . $this->__toString() . ') t' )->fetchSingle() : $this->getTotalCount(); }