Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
dialogik's user avatar
  • 9,542
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 ...
Stefano's user avatar
  • 3,259