Q:

MySQL daily check and update

Is possible to create a routine or procedure that can automatic everyday check a date in a table.
To be simpler : I want to check if the date on a user have permitions to enter a site and when the date pass want to make the user field activated false.
routine daily
 check if (todaydate < dateclient) then
           client.activated= false
Thanks for all the help.

A:

Creating the routine is simple enough, but to run it on a daily basis you'll need to wrap it in a cronjob (*nix) or Scheduled Task (Windows). The routine, unfortunately, cannot execute itself - and to the best of my knowledge MySQL server does not possess the ability to run routines at scheduled intervals.

