Here
https://www.simukti.net/blog/2012/04/05/how-to-select-year-month-day-in-doctrine2/
I've added Month.php intact in Doctrine\ORM\DoctrineExtensions\Query\Mysql
folder then this in bootstrap:
$config->addCustomDatetimeFunction('MONTH',
'Doctrine\ORM\DoctrineExtensions\Query\Mysql\Month');

I run this:
$query = $em->createQuery("SELECT c.username FROM Entities\Client c WHERE
MONTH(c.joinDate) = 10");
$search = $query->getArrayResult();

Then get this with EchoSQLLogger:
SELECT p0_.username AS username0 FROM clients p0_ WHERE
MONTH(p0_.join_date) = 10

since I get no error, I believe the class is loaded and function is called,
but I get an empty array result. I did check join_date timestamp, and there
are some rows for month 10. Did  I do a mistake or their extension is no
longer compatible with 2.4?

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to