Jump to content

how to create event in mysql version 3.1.31

madi_2736's Photo
Posted Dec 26 2011 08:42 AM
2325 Views

I have problem with createing event in mysql version 3.1.3.1.
I wrote some queries in this version, all of them ran with out problem but once I added "create event" codes I was faced with problems. infact the queries run Successfuly but the results arent according to the codes, I mean that the queries results arent as same as the last results( queries with out event), and also the event doesnt run regulary.
please help me with this problem and if I follow wrong instructor to write event in this version pease guide me. :(
queries:
INSERT INTO thanksmsg1( thanksid1, userid, sendername, recivername,reciveremail,
text, attach, score, cost, sendyear, sendmonth, sendday, subject,
tempid, draftid )
SELECT thanksid2, userid, sendername, recivername, reciveremail,
text, attach, score, cost, sendyear, sendmonth, sendday, subject,
tempid, draftid
FROM thanksmsg2
WHERE sendyear=YEAR(CURDATE())
AND sendmonth=MONTH(CURDATE())
AND sendday=DAY(CURDATE())
AND userid IS NOT NULL;

DELETE FROM thanksmsg2
WHERE sendyear=YEAR(CURDATE())
AND sendmonth=MONTH(CURDATE())
AND sendday=DAY(CURDATE());
event:

CREATE EVENT madi ON SCHEDULE EVERY 1 DAY DO
...

Tags:
0 Subscribe


0 Replies