Comando: select permutas.*, imoveis.codigo, imoveis.tipo as tipo, imoveis.titulo, concat(proprietario.nome, " - ", proprietario.email, " - ", proprietario.telefone) as proprietario, concat(permutas.nome, " - ", permutas.email, " - ", permutas.telefone) as solicitante from permutas LEFT JOIN imoveis ON imoveis.idimovel = permutas.idimovel LEFT JOIN clientes as proprietario ON proprietario.idcliente = permutas.idcliente LEFT JOIN clientes as solicitante ON solicitante.idcliente = permutas.idclienteoferece where permutas.idclienteoferece = order by datacadastro desc
Erro: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by datacadastro desc' at line 1