Error en la consulta de conteo de registros: SELECT COUNT(*) FROM galerias, desc_galerias where GAL_IDCONTENIDO= and galerias.GAL_IDGALERIA=desc_galerias.DGA_IDGALERIA and DGA_IDIDIOMA=1 order by GAL_ORDEN . Mysql dijo: 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 'and galerias.GAL_IDGALERIA=desc_galerias.DGA_IDGALERIA and DGA_IDIDIOMA=1 order ' at line 1