MySQL Forums
Forum List  »  Events (Job Scheduler)

Mysql Event
Posted by: slimen Arnaout
Date: June 10, 2013 02:52AM

I have created an event that work every hour for every day
the problem that this event work for only one day I can see the request 'UPDATE' work in database but the next day nothing happen so what is the problem ?
here is the code:

DELIMITER |
CREATE EVENT etat_form
ON SCHEDULE EVERY '10' SECOND ENABLE
DO
BEGIN
UPDATE azed_grh.dformation SET etat_dformation = 0 WHERE id_dformation IN
(SELECT id_dformation_formation FROM azed_grh.fichformation WHERE datefin_formation = ( SELECT CURRENT_DATE( ) ) AND etat_formation = 1 );
UPDATE azed_grh.fichformation SET etat_formation = 0 WHERE datefin_formation = (SELECT CURRENT_DATE());
END |
DELIMITER ;

SET GLOBAL event_scheduler = 1;

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql Event
3663
June 10, 2013 02:52AM
2203
June 11, 2013 02:38AM
2272
June 11, 2013 03:33AM
2238
June 11, 2013 09:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.