diff --git a/manager/ORM/Rows.php b/manager/ORM/Rows.php index 030288b..9f45d43 100644 --- a/manager/ORM/Rows.php +++ b/manager/ORM/Rows.php @@ -865,7 +865,8 @@ } /* (4) On rédige la clause GROUP BY */ - $requestS['GROUPBY'] = SQLBuilder::GROUPBY($groupBy); + if( count($groupBy) > 0) + $requestS['GROUPBY'] = SQLBuilder::GROUPBY($groupBy); /* [6] Clause LIMIT =========================================================*/ @@ -880,6 +881,7 @@ /* (2) On compose la requête */ $requestString = SQLBuilder::BUILD($requestS).';'; + var_dump($requestString); /* (3) On prépare la requête */ $request = Database::getPDO()->prepare($requestString);