No se completó la consulta: "SELECT COUNT(*) AS total FROM nsp_publicidad_ser WHERE id_servicio= AND id_tipo=1 AND tin_estado=1 AND dat_fecha_ini<='2018-05-25'": 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 id_tipo=1 AND tin_estado=1 AND dat_fecha_ini<='2018-05-25'' at line 1