Tuesday, 20 August 2013

Doctinre 2 DQL Reverse LIKE query

Doctinre 2 DQL Reverse LIKE query

I'm trying to do a "simple" LIKE in DQL but i'm getting an error:
[Syntax Error] line 0, col 55: Error: Expected =, <, <=, <>, >, >=, !=, got
'LIKE'
DQL:
SELECT t.valeur FROM Bundle:Table t WHERE 'abc' LIKE CONCAT('%',
t.value, '%')
It is working when i switch LIKE side but that's not what i'm expecting.
Is this possible in DQL or should i do in natively ?

No comments:

Post a Comment