php 按 YEAR 的 TIMESTAMP 分组无效

php group by TIMESTAMP by YEAR not working

在 Zend Framework 中按时间戳对查询进行分组的不同方法有哪些。 您可以使用什么类?最佳做法是什么?

找到答案。

您必须使用表达式:

$select->group(new Expression("YEAR(date_create)"));