How to use the methode Replace using an OO interface


I'm a new about the programing, phalcon and english, but i hope you understand about my problem.

I'm trying to use Replace on a table and remove the " - ", but i don't know how to do.

$joinRegiao = [
                "model" => "Midas\Models\Regional\RegionalCep",
                "equal" => "REPLACE('Midas\Models\Enderecos.cep', '-', '') BETWEEN Midas\Models\Regional\RegionalCep.faixa1 AND Midas\Models\Regional\RegionalCep.faixa2"

Then i compare model and equal with a INNER JOIN and print it.

How can i use the Replace in this case?

Hi Arthur the replace function it isn't supported by default on PHQL. You have to extends your Mysql Dialect see this example.

Good luck

Thank you!