From 0914b4afab661ee57d7da01ce499627505f2b102 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sun, 15 Jul 2018 15:34:40 +0000 Subject: [PATCH] dblayeroo : do not generate an error if a comma is provided to GROUP_CONCAT git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4288 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dblayeroo.php b/dblayeroo.php index 33b9089..432069c 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -1551,7 +1551,12 @@ class dblayeroo $this->DBException ( "Invalid aliasNames provided (not string and not array)"); if (is_string ($columnNames)) + { + // Remove the GROUP_CONCAT(col,',') as ',' is the default and the comma + // will be counted in error + $columnNames = str_replace (",','", "", $columnNames); $columnNames = explode (",", $columnNames); + } if (is_string ($aliasNames)) $aliasNames = explode (",", $aliasNames); if (count ($aliasNames) && count ($aliasNames) !== count ($columnNames))