php-mysql-engine icon indicating copy to clipboard operation
php-mysql-engine copied to clipboard

feat: Improve GROUP_CONCAT Behavior – Consider GROUP BY and Support DISTINCT, ORDER BY, and SEPARATOR Options

Open Javakky-pxv opened this issue 9 months ago • 1 comments

This pull request improves the behaviour of the GROUP_CONCAT function in php-mysql-engine to provide MySQL-compliant aggregation. The main changes include:

  • Adjusting the implementation so that if a GROUP BY clause is present, all rows are processed instead of always returning only the first row.
  • Implement the DISTINCT option to remove duplicate values.
  • Support the ORDER BY option to sort results based on the expression evaluated (in both ASC and DESC directions).
  • A SEPARATOR option has been added to allow customisation of the output delimiter (default is a comma).

Javakky-pxv avatar Mar 18 '25 01:03 Javakky-pxv

@Javakky-pxv great idea!

filisko avatar Mar 26 '25 09:03 filisko