steviemac Posted August 20, 2011 Share Posted August 20, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/245256-can-this-be-done-on-a-database-update/ Share on other sites More sharing options...
MasterACE14 Posted August 20, 2011 Share Posted August 20, 2011 of course this can be done, you just need to SELECT the rows of the affected record. Quote Link to comment https://forums.phpfreaks.com/topic/245256-can-this-be-done-on-a-database-update/#findComment-1259658 Share on other sites More sharing options...
steviemac Posted August 20, 2011 Author Share Posted August 20, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/245256-can-this-be-done-on-a-database-update/#findComment-1259659 Share on other sites More sharing options...
gizmola Posted August 20, 2011 Share Posted August 20, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/245256-can-this-be-done-on-a-database-update/#findComment-1259663 Share on other sites More sharing options...
steviemac Posted August 20, 2011 Author Share Posted August 20, 2011 OK Thanks Quote Link to comment https://forums.phpfreaks.com/topic/245256-can-this-be-done-on-a-database-update/#findComment-1259671 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.