I'm relatively new to PHP and therefore I have only created several small web apps/sites with it, but I'm finding it extremly flexible and a great little package when combined with mySQL.
The problem I'm facing at the moment though is the automated emailing of information to a certain address depending on the status of a record in a mySQL database. For instance I have some expiry dates stored in the database but I want a php script to be executed to notify someone by email that the current date is drawing close to the expiry date when it happens. I have thought about running a schedule on the server at the end of the day that runs a php script which completes the check but there must be a function in mySQL or some other way to do this as I've heard its possible in SQL2000. I've already used the imap_mail() function to send mail from pages successfully, I just need to know the best way of scheduling a database check and email.
Any help would be much appriciated.
Charles.