I want to trigger a function on every update made in my DB. For example, I can use afterSave()
in Yii-activeRecord, but how to use this within command builder
? How to do a method to run after execute command ?
Maybe I make a class to extends the CDbCommand
and override the execute
method like:
public function execute($params=array())
{
parent::execute($params);
$this->afterExecute();
}
but i don't know where to put it