Claro, Willian…
Nenhuma coluna com esse tipo de nome. Todas palavras normais tipo: codigo,nome,endereco,nomepdf, etc
Limpeza nas fontes: editar o fonte e apagar o ‘0x’
linha onde tem a ‘sujeira’:
$comando = "INSERT INTO " . $this->Ini->nm_tabela . " (" . $NM_cmp_auto . "empresa_id, data, cliente_id, tipomov_id, total_mercadorias, total_servicos, embalagem, frete, despesa, desconto, seguro, total_ipi, total_icms, total_venda, total_atacado, num_doc, serie, tipodoc_id, lancado, lancamento_id, obs, vendedor_id, impresso, tipo_nf, danfe_pdf, danfe_pdf_nome, chave_nfe, protocolo_nfe, cns_nota_status, cns_nota_status_motivo, cns_nota_status_dt, cns_nota_status_hr, cns_aprovado, cns_arquivo_fisico_sefaz, canc_status, canc_motivo, canc_dt, canc_hr, canc_eveid, total_vBC, total_vICMS, total_vBCST, total_vST, total_vProd, total_vFrete, total_vSeg, total_vDesc, total_vII, total_vIPI, total_vPIS, total_vCOFINS, total_vOutro, total_vNF, total_vRetPIS, InfAdFisco, InfCpl, nfe_txt_nome, nfe_txt_arquivo, nfe_txt_processado, nfe_xml_nome, nfe_xml_arquivo, nfe_xml_pdf, nfe_xml_situacao, nfe_xml_arquivo_assinado, nfe_xml_arquivo_protocolado, nfe_xml_validacao_erro, id_lote, nro_recibo_sefaz, arquivo_recibo_sefaz, lote_status, IndPag, natOp, tpNF, finNFe, ind_presencial, txt_erro, tipo_frete, cce_seq_evento, cce_status, cce_status_motivo, cce_dt, cce_hr, cce_solicitacao_xml, cce_sefaz_resposta, cce_correcao, orcamento_validade, emissao_nf, emissao_hora, emi_XNome, emi_XFant, emi_IE, emi_IEST, emi_IM, emi_CNAE, emi_CNPJ, emi_CPF, emi_xLgr, emi_nro, emi_Cpl, emi_Bairro, emi_CMun, emi_XMun, emi_UF, emi_XUF, emi_CEP, emi_cPais, emi_xPais, emi_fone, emi_CRT, dest_xNome, dest_IE, dest_ISUF, dest_email, dest_CNPJ, dest_CPF, dest_xLgr, dest_nro, dest_xCpl, dest_xBairro, dest_cMun, dest_xMun, dest_UF, dest_XUF, dest_CEP, dest_cPais, dest_xPais, dest_fone, transportador_id, transp_XNome, transp_CNPJ, transp_IE, transp_XEnder, transp_UF, transp_XUF, transp_CMun, transp_XMun, transp_QVol, transp_Esp, transp_Marca, transp_NVol, transp_PesoL, transp_PesoB, vfp, pg_dinheiro, pg_cheque, pg_outro, pg_desconto, nf_pdf_conteudo, nf_pdf_down, nf_xml_conteudo, nf_xml_down, nf_protocolo, nf_modelo, nf_numero, nf_serie, nf_sit_cod, nf_sit_desc, nf_status, cond_pagto, prazo_entrega, orcamento_num) VALUES (" . $NM_seq_auto . "$this->empresa_id, '$this->data', $this->cliente_id, $this->tipomov_id, $this->total_mercadorias, $this->total_servicos, $this->embalagem, $this->frete, $this->despesa, $this->desconto, $this->seguro, $this->total_ipi, $this->total_icms, $this->total_venda, $this->total_atacado, '$this->num_doc', '$this->serie', $this->tipodoc_id, '$this->lancado', $this->lancamento_id, '$this->obs', $this->vendedor_id, '$this->impresso', '$this->tipo_nf', 0x" . bin2hex($this->danfe_pdf) . ", '$this->danfe_pdf_nome', '$this->chave_nfe', '$this->protocolo_nfe', '$this->cns_nota_status', '$this->cns_nota_status_motivo', '$this->cns_nota_status_dt', '$this->cns_nota_status_hr', '$this->cns_aprovado', 0x" . bin2hex($this->cns_arquivo_fisico_sefaz) . ", '$this->canc_status', '$this->canc_motivo', '$this->canc_dt', '$this->canc_hr', '$this->canc_eveid', $this->total_vbc, $this->total_vicms, $this->total_vbcst, $this->total_vst, $this->total_vprod, $this->total_vfrete, $this->total_vseg, $this->total_vdesc, $this->total_vii, $this->total_vipi, $this->total_vpis, $this->total_vcofins, $this->total_voutro, $this->total_vnf, $this->total_vretpis, '$this->infadfisco', '$this->infcpl', '$this->nfe_txt_nome', 0x" . bin2hex($this->nfe_txt_arquivo) . ", '$this->nfe_txt_processado', '$this->nfe_xml_nome', 0x" . bin2hex($this->nfe_xml_arquivo) . ", 0x" . bin2hex($this->nfe_xml_pdf) . ", '$this->nfe_xml_situacao', 0x" . bin2hex($this->nfe_xml_arquivo_assinado) . ", 0x" . bin2hex($this->nfe_xml_arquivo_protocolado) . ", '$this->nfe_xml_validacao_erro', $this->id_lote, '$this->nro_recibo_sefaz', 0x" . bin2hex($this->arquivo_recibo_sefaz) . ", '$this->lote_status', '$this->indpag', '$this->natop', '$this->tpnf', '$this->finnfe', '$this->ind_presencial', '$this->txt_erro', '$this->tipo_frete', $this->cce_seq_evento, '$this->cce_status', '$this->cce_status_motivo', '$this->cce_dt', '$this->cce_hr', 0x" . bin2hex($this->cce_solicitacao_xml) . ", 0x" . bin2hex($this->cce_sefaz_resposta) . ", '$this->cce_correcao', '$this->orcamento_validade', '$this->emissao_nf', '$this->emissao_hora', '$this->emi_xnome', '$this->emi_xfant', '$this->emi_ie', '$this->emi_iest', '$this->emi_im', '$this->emi_cnae', '$this->emi_cnpj', '$this->emi_cpf', '$this->emi_xlgr', '$this->emi_nro', '$this->emi_cpl', '$this->emi_bairro', $this->emi_cmun, '$this->emi_xmun', '$this->emi_uf', '$this->emi_xuf', '$this->emi_cep', $this->emi_cpais, '$this->emi_xpais', $this->emi_fone, $this->emi_crt, '$this->dest_xnome', '$this->dest_ie', '$this->dest_isuf', '$this->dest_email', '$this->dest_cnpj', '$this->dest_cpf', '$this->dest_xlgr', '$this->dest_nro', '$this->dest_xcpl', '$this->dest_xbairro', $this->dest_cmun, '$this->dest_xmun', '$this->dest_uf', '$this->dest_xuf', '$this->dest_cep', $this->dest_cpais, '$this->dest_xpais', '$this->dest_fone', $this->transportador_id, '$this->transp_xnome', '$this->transp_cnpj', '$this->transp_ie', '$this->transp_xender', '$this->transp_uf', '$this->transp_xuf', $this->transp_cmun, '$this->transp_xmun', $this->transp_qvol, '$this->transp_esp', '$this->transp_marca', '$this->transp_nvol', $this->transp_pesol, $this->transp_pesob, $this->vfp, $this->pg_dinheiro, $this->pg_cheque, $this->pg_outro, $this->pg_desconto, 0x" . bin2hex($this->nf_pdf_conteudo) . ", '$this->nf_pdf_down', 0x" . bin2hex($this->nf_xml_conteudo) . ", '$this->nf_xml_down', '$this->nf_protocolo', '$this->nf_modelo', '$this->nf_numero', '$this->nf_serie', $this->nf_sit_cod, '$this->nf_sit_desc', '$this->nf_status', '$this->cond_pagto', '$this->prazo_entrega', $this->orcamento_num)";
0x" . bin2hex($this->cce_solicitacao_xml) . "[/code] mudei para [code]'$this->cce_solicitacao_xml'
Fazendo essa limpeza, funciona sem erro.