Skip to content
Advertisement

Doctrine2 find by value in field array

i wonder if there is a way to search for a document field looking like :

JavaScript

which in database looks like php array interpretation :

JavaScript

now i try to search the entity by a tag tryed

JavaScript

which always returns array[0] just dont get it

i am able to change the way how they are saved for any help, thanks in advance

Advertisement

Answer

You need to define a literal tag for % before and/or after the value you want to search; in this case you won’t even need to have single quotation before and after your phrase:

JavaScript

You can follow a list of all Doctrine expr class

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement