php-mysql-engine
php-mysql-engine copied to clipboard
feat: Improve GROUP_CONCAT Behavior – Consider GROUP BY and Support DISTINCT, ORDER BY, and SEPARATOR Options
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 great idea!