I am looking for a method that will be called before/after insert() or update() in Zend_DB? I am don’t want to relly on database trigger for this … could you help me ? thank you !!!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just override the
insert()andupdate()methods in your Table class.For example:
If you want to do it for all your table objects then you could have a base class that they all extend such as:
And then a class to use it: