Posts tagged: zadania

Event – Zadania w MySQL

Tworzenie procedury w MySQL np:
DELIMITER $$
CREATE PROCEDURE travels.MOVE_OLD_AUTOMAILER_RECORDS()
BEGIN
INSERT INTO anyDb.automailer_old(id, from_email, from_name, to_email, subject, body, alt_body, swift_message, created_at, sent_at, is_html, is_sending, is_sent, is_failed, started_sending_at)
SELECT * FROM anyDb.automailer WHERE sent_at <= (SELECT NOW() - INTERVAL 1 MONTH);
DELETE FROM anyDb.automailer WHERE sent_at <= (SELECT NOW() - INTERVAL 1 MONTH);
END $$
DELIMITER ;

Continue reading 'Event – Zadania w MySQL'»