How to use the expression mysql NOW() in doctrine querybuilder?
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
Using query builder it would look like this:
Note: extra quotes on parameter set is required to get
CURRENT_TIMESTAMP()
function working.Or simply
In Doctrine2 you have to use one of the following instead of
NOW()
.This:
Or:
If you want only time or only date use one of those:
CURRENT_TIME()
andCURRENT_DATE()
Documentation can be found here.