2pg_query(): Query failed: ERROR: invalid input syntax for integer: "14.html" at character 1076/data/soleon/producao/system/database/drivers/postgre/postgre_driver.php124 Database Error

Erro Banco de Dados

Error Number:

ERROR: invalid input syntax for integer: "14.html" at character 1076

SELECT l.*, l.data_fim AS encerramento, TO_CHAR(l.data_2nd,'DD/MM/YYYY') AS data_2nd_f, TO_CHAR(l.data_2nd, 'HH24:MI') AS hora_2nd_f, c.nome_razao_social AS comitente, CASE WHEN l.data_fim IS NOT NULL THEN TO_CHAR(l.data_fim, 'DD/MM/YYYY as HH24:MI') ELSE '--' END AS data_fim, t.desc_tipo, '-' as total_lotes, null AS ultimo_lote_a_fechar, CASE WHEN (l.venda_direta = 'S') THEN CASE l.status_leilao WHEN 0 THEN 0 WHEN 1 THEN 8 WHEN 2 THEN 2 WHEN 3 THEN 8 WHEN 4 THEN 4 WHEN 5 THEN 5 WHEN 6 THEN 6 ELSE NULL END ELSE CASE l.status_leilao WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 2 WHEN 3 THEN 3 WHEN 4 THEN 4 WHEN 5 THEN 5 WHEN 6 THEN 6 ELSE NULL END END AS n_status_leilao FROM leiloes l INNER JOIN tipo_leilao t ON l.tipo_leilao = t.id_tipo LEFT JOIN comitentes c ON c.id_comitente = l.comitente_id WHERE l.id_leilao = '14.html' AND l.status_leilao NOT IN(0)