Fixed bug #16492: groupBy and orderBy fail on exec_query (thanks to Oguzhan Alan)
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 30 Nov 2010 23:55:03 +0000 (23:55 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 30 Nov 2010 23:55:03 +0000 (23:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@40690 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.ux_t3lib_db.php

index d5fb039..88579bd 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-01  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #16492: groupBy and orderBy fail on exec_query (thanks to Oguzhan Alan)
+
 2010-11-30  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Fixed bug #16501: DBAL does not support multi-column indexes in create table queries
index 78e0868..8e7a30f 100644 (file)
@@ -912,8 +912,8 @@ class ux_t3lib_DB extends t3lib_DB {
                                $selectFields = $this->SQLparser->compileFieldList($queryParts['SELECT']);
                                $fromTables = $this->SQLparser->compileFromTables($queryParts['FROM']);
                                $whereClause = isset($queryParts['WHERE']) ? $this->SQLparser->compileWhereClause($queryParts['WHERE']) : '1=1';
-                               $groupBy = isset($queryParts['GROUPBY']) ? $this->SQLparser->compileWhereClause($queryParts['GROUPBY']) : '';
-                               $orderBy = isset($queryParts['GROUPBY']) ? $this->SQLparser->compileWhereClause($queryParts['ORDERBY']) : '';
+                               $groupBy = isset($queryParts['GROUPBY']) ? $this->SQLparser->compileFieldList($queryParts['GROUPBY']) : '';
+                               $orderBy = isset($queryParts['ORDERBY']) ? $this->SQLparser->compileFieldList($queryParts['ORDERBY']) : '';
                                $limit = isset($queryParts['LIMIT']) ? $this->SQLparser->compileWhereClause($queryParts['LIMIT']) : '';
                                return $this->exec_SELECTquery($selectFields, $fromTables, $whereClause, $groupBy, $orderBy, $limit);