diff --git a/api/src/Storage/Base.php b/api/src/Storage/Base.php index a0831d781d..70aa354a4d 100644 --- a/api/src/Storage/Base.php +++ b/api/src/Storage/Base.php @@ -1127,7 +1127,7 @@ class Base public static function fix_group_by_columns($group_by, &$columns, $table_name, $autoinc_id) { $matches = null; - if ($GLOBALS['egw']->db->Type == 'mysql' || !preg_match('/(GROUP BY .*)(HAVING.*|ORDER BY.*)?$/iU', $group_by, $matches)) + if (substr($GLOBALS['egw']->db->Type, 0, 5) == 'mysql' || !preg_match('/(GROUP BY .*)(HAVING.*|ORDER BY.*)?$/iU', $group_by, $matches)) { return $group_by; // nothing to do }