Attention
Error while accessing the database
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND cta.bActivo = 1' at line 1
select count(*) from edc_pedimento_archivo AS pa LEFT JOIN edc_cat_tipo_archivo AS cta ON pa.nidTipoArchivo = cta.id LEFT JOIN edc_cat_sistema AS sis ON pa.nidSistema = sis.id LEFT JOIN edc_pedimento AS p ON pa.nidPedimento = p.id where pa.nidPedimento = AND cta.bActivo = 1