In mysql I can do this.
SELECT * FROM 'Cidade' ORDER BY 'id'=1347 DESC
But I can not do codeigniter, I'm trying like this:
$this->db->order_by("id = 1347", "DESC")
->get("Cidades");
In this case his output looks like this:
SELECT * FROM 'Cidade' ORDER BY 'id=1347' DESC
It is putting a block in the entire expression. it does not work there. Thanks in advance for your help.