All Questions
2 questions
42
votes
5
answers
54k
views
How can I use SQL's YEAR(), MONTH() and DAY() in Doctrine2?
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) = 2013 AND
MONTH(t.timestamp) = 09 AND
...
3
votes
2
answers
6k
views
Doctrine 2 DATE_ADD mysql function with computed interval value
I have a query that gives me a unix timestamp calculated selecting the datetime value of a table field and then adding another value of the table. The query is something like the following:
SELECT ...