SELECT id FROM cron_alertas WHERE fecha='2024-05-05' SELECT id FROM cron_alertas WHERE fecha='2024-05-05'
SELECT a.*, r.email as email_responsable FROM alojamientos a INNER JOIN responsables r on r.id = a.idresponsable where pagado = 0 AND opcion_pago!='' AND fecha_registro + INTERVAL 2 DAY = CURDATE() and r.email !=null and idresponsable > 15SELECT a.*, r.email as email_responsable FROM alojamientos a INNER JOIN responsables r on r.id = a.idresponsable where pagado = 0 AND opcion_pago!='' AND fecha_registro + INTERVAL 6 DAY = CURDATE() and r.email !=null and idresponsable > 15SELECT a.*, r.email as email_responsable FROM alojamientos a INNER JOIN responsables r on r.id = a.idresponsable where pagado = 1 AND opcion_pago!='' AND fecha_vencimiento - INTERVAL 7 DAY = CURDATE() and r.email !=null and idresponsable > 15SELECT a.*, r.email as email_responsable FROM alojamientos a INNER JOIN responsables r on r.id = a.idresponsable where pagado = 1 AND opcion_pago!='' AND fecha_vencimiento + INTERVAL 1 DAY <= CURDATE()INSERT INTO cron_alertas VALUES (null,'2024-05-05')