hi
i want to know can i write stored procedures in MySql?
if yes then how can i write a stored prosedure which automatically runs after every one hour and delete messages form a table which r six months old?
| SitePoint Sponsor |



hi
i want to know can i write stored procedures in MySql?
if yes then how can i write a stored prosedure which automatically runs after every one hour and delete messages form a table which r six months old?
its urgent plzzz.....
regards
phphelp


yes, you can write stored procedures in mysql version 5
sorry, i cannot help you with writing a stored procedure that runs automatically
but isn't every hour a bit excessive if you're deleting messages older than 6 months?
i mean, suppose you run it at 10 o'clock, then an hour later, how many more messages are there going to be that are now 6 months old that didn't get deleted an hour ago?

You would have to create a CRON job that executes a script to run the stored procedure.
Bookmarks