Take the 2-minute tour ×  I'm playing with DoctrineExtensions
but can not manage it. After register DoctrineExtensions, I have
following line of DQL with Zend Framework:  $qb->having(new
IfElse("A.type = 0", new FindInSet(1, new GroupConcat('B.id',
',')) >0 , '1') );  But get this error msg:  Exception
information:  Message: Expression of type
'DoctrineExtensions\Query\Mysql\IfElse' not allowed in this
context.*  Could you help me to point out what incorrect in my
command or any document on how to use DoctrineExtensions?   I've
found a the way to implement custom function by : I have given
it a litle try by adding this line to boostrap:
$config->addCustomStringFunction('IF',
'DoctrineExtensions\Query\Mysql\IfElse');  And use it in DQL as:
$qb->having("IF( A.type = 0, S.status = 0, S.status = 1 )");
But get this error:  Message: [Syntax Error] line 0, col 152:
Error: Expected Doctrine\ORM\Query\Lexer::T_COMMA, got '='
Maybe I'm wrong in syntax?  share|improve this question I'm back
late, and leave comment