Welcome to the Monastery | |
PerlMonks |
Using Perl and MySQL for Activity Logby PyrexKidd (Monk) |
on Apr 27, 2011 at 05:55 UTC ( [id://901472]=perlquestion: print w/replies, xml ) | Need Help?? |
PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question: I am using Perl and MySQL to create a customer catalog. What I would like to do is create a change log, so when I update the primary table I have a record of it. I have created my tables as such:
So I update the DB pragmatically like so:
What I would like to do is: if a record exists, update the record with name, address, etc. and insert a new record into the change log, with number affected and action performed. If a record doesn't exist, insert the new record into the customer catalog (along with name, address, and any notes where applicable) and add a new record to the change log noting the addition. Thanks in advance for any assistance. This one has had me stuck.
Back to
Seekers of Perl Wisdom
|
|