dblayeroo : if there is only one displayed GROUP select, do not add an empty "GROUP BY" in SQL request. The request is invalid.

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4286 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2018-07-15 06:48:14 +00:00
parent 5560ab2943
commit 5deab3c430
2 changed files with 28 additions and 1 deletions

View File

@@ -2315,7 +2315,8 @@ class dblayeroo
if ($this->groupByNeeded ())
{
$groupByExpression = $this->groupByGet ();
$sql .= "\n GROUP BY ". implode (",", $groupByExpression);
if (count ($groupByExpression))
$sql .= "\n GROUP BY ". implode (",", $groupByExpression);
}
if (count ($order))
$sql .= "\n ORDER BY ". implode (",", $order);