php - Doctrine querybuilder DATE_FORMAT not working -


I'm having some problems with DATE_FORMAT within a createQuerybuilder

My code: <("R.Kredetate") - & gt; Select ("DATE_FORMAT (Rated Rating, '% Y-% m-% D') =: afterDays") - & gt; And where ('R.cCurrentReviewState =: state') - & gt; And where ('r. Reinders =: reminder') - & gt; SetParameter ('AfterDays', after $ 7) - & gt; SetParameter ('state', $ oReviewStateNot verified) // not_verified - & gt; SetParameter ('Reminders', 0) // never sent a reminder - & gt; Order By ('R', 'ASC') - & gt; GetQuery);

but im getting \ ORM \ query \ query exception [syntax error] line 0, to 7: error: of known function Hopefully got 'DATE_FORMAT'

I have searched for some links and find out that it should work like this, but it is doing something wrong for me.

DATE_FORMAT as well as a bunch of MySQL functions

You can either create your own or use an extension like that, and then use your theory bundle config such as

  Principle: dbal: ... can add related work. Orm: .... dql: string_functions: DATE_FORMAT: theory \ query \ Mysql \ DateFormat    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -