Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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!