I need to execute a SQL query two hours after I insert a row in a particular table.
I can create a trigger to execute that query, but the problem is that i have to run it after two hours. I know MySQL 5.1.6 and later support events, but I have a 5.1.4 version. Upgrading is a solution, but can I do this without using events?
I am using Windows — is there something like cron on Linux that I can use to schedule the job?
The events (also called ‘Jobs’ on other DBMSs) are what you are looking for, but if you’re on Windows, you could also write a script performing your actions. You can connect to MySQL from PHP or others kinds of scripts and execute any queries you want or run a stored procedure. This scripts can then be scheduled using the Scheduled Tasks feature of Windows.