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 UNIX_TIMESTAMP(DATE_ADD(mydatetimefield, INTERVAL m.myfield1 + m.myfield2 MINUTE)) FROM mytable AS m
this query executes correctly from phpMyAdmin but when I try to use it with the createQueryBuilder method of Doctrine 2 I get an error at "myfield". It seems that it doesn't support a computed value after the INTERVAL keyword
Error: Expected Doctrine\ORM\Query\Lexer::T_COMMA, got 'm'
how can I then get the same query result by using doctrine? I use the querybuilder because I have some named parameters