I have to use SUBSTRING_INDEX
function in doctrine ORM in symfony 2. How can I do this? Right now using it inside the query gives me undefined function error:
[Syntax Error] line 0, col 299: Error: Expected known function, got 'SUBSTRING_INDEX'
I use this function to get the first number from, for example:
11.48.205.1
How can I solve this?
Here is class that represent SUBSTRING_INDEX function (don't forget to update namespace).
You need to register it before creating entity manager:
After you do it you'll get the following results: