0

I have little problem, because I have in table element "waznosc" which is date. And I want to delete records where date = "today". I tried something like this:

CREATE EVENT rec ON DATE() DO DELETE FROM userproduct WHERE waznosc=CURDATE()

But it doesn't work :/ Somebody have idea what can be wrong or know any other way how can I solve my problem?

Mateusz
  • 323
  • 2
  • 11
  • 23
  • `ON DATE()` is wrong. When is this event supposed to run? – Barmar May 01 '15 at 21:44
  • See the syntax at https://dev.mysql.com/doc/refman/5.1/en/create-event.html – Barmar May 01 '15 at 21:44
  • Please explain what you mean by "it doesn't work". How do you know it didn't work? Is there an error message? – dg99 May 01 '15 at 21:45
  • possible duplicate of [MySQL Event Scheduler on a specific time everyday](http://stackoverflow.com/questions/3070277/mysql-event-scheduler-on-a-specific-time-everyday) – Sean May 01 '15 at 22:18

0 Answers0