Jump to content
Larry Ullman's Book Forums

Recommended Posts

In my "Dues_Date" column I have "2012-10-01" which is the time the dues must be paid for the coming term.

 

I want that date to update itself, if possible, to "2013-10-01" on precisely the original dues date above.

 

Can mySql do this by itself or do I need to write a script for it? In that case, how does the script get run if I'm, let's say, in Jamaica drinking a pina colada at the time?

Link to comment
Share on other sites

The problem with triggers is that they are internal to the database. A trigger can have a secondary action occur when a primary action occurs, but the primary action would still need to be caused by something outside of the database.

Link to comment
Share on other sites

Triggers cannot be fired at a particular time. Triggers react to other events.

 

Instead of a cronjob, however, one could use MySQL's event scheduler, assuming that's supported in your version of MySQL.

Link to comment
Share on other sites

 Share

×
×
  • Create New...