How can I use SQL's YEAR(), MONTH() and DAY() in Doctrine2?

后端 未结 5 1211
Happy的楠姐
Happy的楠姐 2020-11-29 07:04

I want to perform a query which would look like this in native SQL:

SELECT
    AVG(t.column) AS average_value
FROM
    table t
WHERE
    YEAR(t.timestamp) =          


        
5条回答
  •  鱼传尺愫
    2020-11-29 07:44

    orocrm/doctrine-extensions seems to be a good project too

    It supports both MySQL and PostgreSql .. the goal is to be cross DB

提交回复
热议问题