Lub poprzez save, co ja stosuję, a co było w tych tematach do podałem:
/**
* Save Changed Columns
*
* @return void
*/
public function save()
{
$data = $this->_data;
$myTableData = array();
foreach ( ( $this->_new ? $this->_data : $this->changed ) as $k => $v )
{
if ( \in_array( $k, array( 'col1', 'col2' ) ) )
{
$myTableData[ $k ] = $v;
unset( $this->_data[ $k ] );
unset( $this->changed[ $k ] );
}
}
parent::save();
$data['m_id'] = $this->_data['member_id'];
$this->_data = $data;
if ( \count( $myTableData ) )
{
$myTableData['m_id'] = $this->member_id;
\IPS\Db::i()->insert( 'test55_testdata', $myTableData, TRUE );
}
}