Jump to content

Can This Be Done On A Database Update


steviemac

Recommended Posts

Hello, I have a form where individuals can update there personal information that is already stored in a database,

i.e name, address, phone number etc.  There are several fields they can update.  Right now it sends an email to the owner that an individual has updated their records, and sends all the fields that are in the table.

 

Is it possible to let the owner be notified by email which individual field was updated?  Example their phone number has changed they make the update and the owner gets an e-mail with just that field update.

 

I hope I explained myself properly.

 

Thank you in advance.

 

Link to comment
Share on other sites

I think I understand that, if I do a SELECT rows,it would send them all the information that is in that row, name,  address,

phone number, etc. 

 

I just want want the updated field sent i.e. phone number so the e-mail body is something like this

 

$emailBody = "$fname  $lname  has updated $phone.\n"

 

Does that make sense or do they have to get all the info that is in the row.

 

Thanks

Link to comment
Share on other sites

I think I understand that, if I do a SELECT rows,it would send them all the information that is in that row, name,  address,

phone number, etc. 

 

I just want want the updated field sent i.e. phone number so the e-mail body is something like this

 

$emailBody = "$fname  $lname  has updated $phone.\n"

 

Does that make sense or do they have to get all the info that is in the row.

 

Thanks

 

You send what you want to send, but you also need to keep track in code of what changed in the row.  In other words, this is a feature of the php code you write, not something built into mysql.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.