I am trying to choose from a table where the selected duration divided by the recording duration is zero.
$qb = $em->createQueryBuilder()
->from('AcmeBlogBundle:Entry', 'e')
->andWhere(":duration % e.duration = 0")
->setParameter('duration', $duration);
This returns an error:
[Syntax Error] line 0, col 226: Error: Expected =, <, <=, <>, >, >=, !=, got '%'
This will work in plain SQL. Does anyone know how to do this with the Doctrine query constructor?
source
share