Ask the Expert

E-mail notification for database record additions

How can I set up my MySQL 4.0 database so that I get e-mail notification each time a record is added? Is there a way to do is using a shell or PHP script?

    Requires Free Membership to View

The simplest way is to add an e-mail send to the application adding the data. In MySQL 5.0, you could use a combination of a trigger and a user-defined function (UDF) to do this, with the UDF calling some form of C function for sending email.

This was first published in April 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: