When I add a quote in the function INSTR() like this :
$value = " string with quote ' that make error ";
$queryBuilder->orderBy('INSTR(field, '.$this->getEntityManager()->getConnection()->quote($value).')');
This code generate this error :
"[Syntax Error] line 0, col 131: Error: Expected Doctrine\\ORM\\Query\\Lexer::T_CLOSE_PARENTHESIS, got 'that'"
NB: If I remove the quote in the string the query works.
When I add a quote in the function INSTR() like this :
This code generate this error :
NB: If I remove the quote in the string the query works.
Environnement :