I am trying to use custom sorting in Doctrine 2 (using MySQL). Code looks somehow like this:
$queryBuilder->orderBy("i.type = 5, i.type = 3, i.type = 7");
The error I get is this one: [Syntax Error] line 0, col 72: Error: Expected end of string, got '='
.
I have found out that this is not possible because of compatibility with other database systems. So my questions is: How can do this in other way, directly in the query (if possible)?